<?php

namespace App\Filament\Resources\Audits;

use App\Filament\Resources\Audits\Pages\CreateAudit;
use App\Filament\Resources\Audits\Pages\EditAudit;
use App\Filament\Resources\Audits\Pages\ListAudits;
use App\Filament\Resources\Audits\Schemas\AuditForm;
use App\Filament\Resources\Audits\Tables\AuditsTable;
use App\Models\Audit;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;

class AuditResource extends Resource
{
    protected static ?string $model = Audit::class;
    protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-magnifying-glass';
    protected static string|\UnitEnum|null $navigationGroup = 'Audit';
    protected static ?string $navigationLabel = 'Temuan Audit';

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

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

    public static function getPages(): array
    {
        return [
            'index'  => ListAudits::route('/'),
            'create' => CreateAudit::route('/create'),
            'edit'   => EditAudit::route('/{record}/edit'),
        ];
    }
}
