<?php

namespace App\Modules\Pilkades\Http\Requests\SuperAdmin;

use Illuminate\Foundation\Http\FormRequest;

class StoreKecamatanRequest extends FormRequest
{
    public function authorize(): bool
    {
        return $this->user()->isSuperAdmin();
    }

    public function rules(): array
    {
        return [
            'kabupaten_id' => ['required', 'uuid', 'exists:kabupaten,id'],
            'nama' => ['required', 'string', 'max:255'],
            'kode_wilayah' => ['nullable', 'string', 'max:50'],
            'is_active' => ['sometimes', 'boolean'],
        ];
    }
}
