<?php

namespace App\Filament\Resources\PaymentLinks;

use App\Filament\Resources\PaymentLinks\Pages\CreatePaymentLink;
use App\Filament\Resources\PaymentLinks\Pages\EditPaymentLink;
use App\Filament\Resources\PaymentLinks\Pages\ListPaymentLinks;
use App\Filament\Resources\PaymentLinks\Schemas\PaymentLinkForm;
use App\Filament\Resources\PaymentLinks\Tables\PaymentLinksTable;
use App\Models\PaymentLink;
use BackedEnum;
use Filament\Resources\Resource;
use Filament\Schemas\Schema;
use Filament\Support\Icons\Heroicon;
use Filament\Tables\Table;

class PaymentLinkResource extends Resource
{
    protected static ?string $model = PaymentLink::class;

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

    protected static ?string $recordTitleAttribute = 'title';

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

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

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

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


