<?php

namespace App\Filament\Resources\QrcodeRecords;

use App\Filament\Resources\QrcodeRecords\Pages\CreateQrcodeRecord;
use App\Filament\Resources\QrcodeRecords\Pages\EditQrcodeRecord;
use App\Filament\Resources\QrcodeRecords\Pages\ListQrcodeRecords;
use App\Filament\Resources\QrcodeRecords\Schemas\QrcodeRecordForm;
use App\Filament\Resources\QrcodeRecords\Tables\QrcodeRecordsTable;
use App\Models\QrcodeRecord;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class QrcodeRecordResource extends Resource
{
    protected static ?string $model = QrcodeRecord::class;

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

    protected static ?string $recordTitleAttribute = 'table';

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

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

    public static function getRelations(): array
    {
        return [
            //
        ];
    }
    public static function canCreate(): bool { return false; }
    public static function canEdit($record): bool { return false; }
    public static function canDelete($record): bool { return false; }
    public static function getPages(): array
    {
        return [
            'index' => ListQrcodeRecords::route('/'),
        ];
    }
}
