<?php

namespace App\Filament\Resources\Pengaduans;

use App\Filament\Resources\PengaduanResource\Pages\ListPengaduans as PagesListPengaduans;
use App\Filament\Resources\Pengaduans\Pages\CreatePengaduan;
use App\Filament\Resources\Pengaduans\Pages\_EditPengaduan;
use App\Filament\Resources\Pengaduans\Pages\ListPengaduans;
use App\Filament\Resources\Pengaduans\Schemas\PengaduanForm;
use App\Filament\Resources\Pengaduans\Tables\PengaduansTable;
use App\Models\Pengaduan;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class PengaduanResource extends Resource
{
    protected static ?string $model = Pengaduan::class;

    protected static string|BackedEnum|null $navigationIcon = Heroicon::ChatBubbleLeft;

    protected static ?string $navigationLabel = 'Pengaduan';

    public static function getPluralLabel(): ?string
    {
        return 'Pengaduan';
    }

    public static function getLabel(): ?string
    {
        return 'Pengaduan';
    }
    protected static string|\UnitEnum|null $navigationGroup = 'Layanan Desa';

    public static function form(Schema $schema): Schema
    {
        return PengaduanForm::configure($schema);
    }

    public static function table(Table $table): Table
    {
        return PengaduansTable::configure($table);
    }

    public static function getRelations(): array
    {
        return [
            //
        ];
    }

    public static function getPages(): array
    {
        return [
            'index' => ListPengaduans::route('/'),
            'edit' => _EditPengaduan::route('/{record}/edit'),
        ];
    }
}
