<?php

namespace App\Filament\Resources\CashCategories;

use App\Filament\Resources\CashCategories\Pages\CreateCashCategory;
use App\Filament\Resources\CashCategories\Pages\EditCashCategory;
use App\Filament\Resources\CashCategories\Pages\ListCashCategories;
use App\Filament\Resources\CashCategories\Schemas\CashCategoryForm;
use App\Filament\Resources\CashCategories\Tables\CashCategoriesTable;
use App\Models\CashCategory;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Tables\Table;

class CashCategoryResource extends Resource
{
    protected static ?string $model = CashCategory::class;
    protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-tag';
    protected static string|\UnitEnum|null $navigationGroup = 'Keuangan';
    protected static ?string $navigationLabel = 'Kategori';

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

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

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