<?php

declare(strict_types=1);

namespace TechnoArtisan\FilamentCms\Filament\Admin\Resources\WebsiteSettings;

use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;
use TechnoArtisan\FilamentCms\Models\WebsiteSettings;
use TechnoArtisan\FilamentCms\Filament\Admin\Resources\WebsiteSettings\Pages\CreateWebsiteSetting;
use TechnoArtisan\FilamentCms\Filament\Admin\Resources\WebsiteSettings\Pages\EditWebsiteSetting;
use TechnoArtisan\FilamentCms\Filament\Admin\Resources\WebsiteSettings\Pages\ListWebsiteSettings;
use TechnoArtisan\FilamentCms\Filament\Admin\Resources\WebsiteSettings\Schemas\WebsiteSettingForm;
use TechnoArtisan\FilamentCms\Filament\Admin\Resources\WebsiteSettings\Tables\WebsiteSettingsTable;

class WebsiteSettingResource extends Resource
{
    protected static ?string $model = WebsiteSettings::class;

    protected static ?string $navigationLabel = 'Settings';

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

    protected static ?int $navigationSort = 1;

    protected static string|null|\UnitEnum $navigationGroup = 'System';

    protected static ?string $recordTitleAttribute = 'Settings';

    protected static ?string $breadcrumb = 'Settings';

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

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

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

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