<?php

namespace App\Filament\Resources\Manage\EggCollections;

use App\Filament\Resources\Manage\EggCollections\Pages\CreateEggCollection;
use App\Filament\Resources\Manage\EggCollections\Pages\EditEggCollection;
use App\Filament\Resources\Manage\EggCollections\Pages\ListEggCollections;
use App\Filament\Resources\Manage\EggCollections\Schemas\EggCollectionForm;
use App\Filament\Resources\Manage\EggCollections\Tables\EggCollectionsTable;
use App\Models\EggCollection;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;

class EggCollectionResource extends Resource
{
    protected static ?string $model = EggCollection::class;

    protected static string|UnitEnum|null $navigationGroup = 'Kelola';

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

    protected static ?string $navigationLabel = 'Produksi Telur';

    protected static ?int $navigationSort = 2;

    protected static ?string $recordTitleAttribute = 'production_date';

    protected static ?string $slug = 'manage/egg-collections';

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

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

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