<?php

namespace App\Filament\Resources\Master\SubLocations;

use App\Filament\Resources\Master\SubLocations\Pages\ManageSubLocations;
use App\Filament\Resources\Master\SubLocations\Schemas\SubLocationForm;
use App\Filament\Resources\Master\SubLocations\Tables\SubLocationTable;
use App\Models\SubLocation;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use UnitEnum;

class SubLocationResource extends Resource
{
    protected static ?string $model = SubLocation::class;

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

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

    protected static ?string $navigationLabel = 'Sublokus';

    protected static ?int $navigationSort = 4;

    protected static ?string $slug = 'master/sub-locations';

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

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

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