<?php

namespace App\Filament\Resources\DeliveryCalendarOverrides;

use App\Filament\Resources\DeliveryCalendarOverrides\Pages\CreateDeliveryCalendarOverride;
use App\Filament\Resources\DeliveryCalendarOverrides\Pages\EditDeliveryCalendarOverride;
use App\Filament\Resources\DeliveryCalendarOverrides\Pages\ListDeliveryCalendarOverrides;
use App\Filament\Resources\DeliveryCalendarOverrides\Schemas\DeliveryCalendarOverrideForm;
use App\Filament\Resources\DeliveryCalendarOverrides\Tables\DeliveryCalendarOverridesTable;
use App\Models\DeliveryCalendarOverride;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;

class DeliveryCalendarOverrideResource extends Resource
{
    protected static ?string $model = DeliveryCalendarOverride::class;

    protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-exclamation-triangle';

    protected static string|\UnitEnum|null $navigationGroup = 'Szállítás';

    protected static ?string $navigationLabel = 'Beszállítói felülbírálások';

    protected static ?string $modelLabel = 'Beszállítói felülbírálás';

    protected static ?string $pluralLabel = 'Beszállítói felülbírálások';

    protected static ?string $breadcrumb = 'Beszállítói felülbírálások';

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

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

    public static function getRelations(): array
    {
        return [
            //
        ];
    }

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

    public static function getRecordRouteBindingEloquentQuery(): Builder
    {
        return parent::getRecordRouteBindingEloquentQuery()
            ->withoutGlobalScopes([
                SoftDeletingScope::class,
            ]);
    }
}
