<?php

declare(strict_types=1);

namespace App\Filament\Resources\Links\Schemas;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;

class LinkForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('name')
                    ->label(__('admin.fields.name'))
                    ->required(),
                TextInput::make('url')
                    ->label(__('admin.fields.url'))
                    ->url()
                    ->required(),
                Textarea::make('note')
                    ->label(__('admin.fields.note'))
                    ->columnSpanFull(),
                TextInput::make('display_order')
                    ->label(__('admin.fields.display_order'))
                    ->required()
                    ->numeric()
                    ->default(0),
                Toggle::make('visible')
                    ->label(__('admin.fields.visible'))
                    ->required(),
            ]);
    }
}
