<?php

namespace App\Filament\Resources\Manage\EggCollections\Pages;

use App\Filament\Actions\Cheerful\CreateAction;
use App\Filament\Resources\Manage\EggCollections\EggCollectionResource;
use Filament\Resources\Pages\ManageRecords;
use Filament\Support\Enums\Width;

class ManageEggCollections extends ManageRecords
{
    protected static string $resource = EggCollectionResource::class;

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

    protected function getHeaderActions(): array
    {
        return [
            CreateAction::make()
                ->label('Tambah')
                ->modalHeading('Tambah Produksi Telur')
                ->modalSubmitActionLabel('Simpan')
                ->modalCancelActionLabel('Batal')
                ->extraModalFooterActions(fn (CreateAction $action): array => [
                    $action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
                        ->label('Simpan dan Tambah Lagi'),
                ])
                ->modalWidth(Width::FourExtraLarge),
        ];
    }
}
