<?php

namespace App\Filament\Resources\Footers;

use App\Filament\Resources\Footers\Pages\CreateFooter;
use App\Filament\Resources\Footers\Pages\EditFooter;
use App\Filament\Resources\Footers\Pages\ListFooters;
use App\Filament\Resources\Footers\Pages\ViewFooter;
use App\Filament\Resources\Footers\Schemas\FooterForm;
use App\Filament\Resources\Footers\Schemas\FooterInfolist;
use App\Filament\Resources\Footers\Tables\FootersTable;
use App\Models\Footer;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class FooterResource extends Resource
{
    public static function canAccess(): bool
    {
        return auth()->user()?->can('admin') ?? false;
    }

    protected static ?string $model = Footer::class;

    protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-adjustments-horizontal';
    protected static string | \UnitEnum | null $navigationGroup = 'Treść';
    protected static ?string $pluralModelLabel = 'Stopka';
    protected static ?string $modelLabel = 'Stopka';
    protected static ?int $navigationSort = 7;

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

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