<?php

declare(strict_types=1);

namespace App\Filament\Resources\Stylevars\Schemas;

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

class StylevarForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('title')
                    ->label(__('admin.fields.title'))
                    ->required()
                    ->maxLength(120),
                Textarea::make('value')
                    ->label(__('admin.fields.value'))
                    ->rows(8)
                    ->columnSpanFull(),
                Toggle::make('visible')
                    ->label(__('admin.fields.visible'))
                    ->default(true),
            ]);
    }
}
