<?php

namespace App\Filament\Pages\Settings\Seo\Schemas;

use App\Filament\Support\CheerfulNotification;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;

class SeoSettingsForm
{
    public static function configure(Schema $schema): Schema
    {
        return $schema
            ->components([
                Section::make(fn () => CheerfulNotification::getByKey('settings.seo.section.title'))
                    ->description(fn () => CheerfulNotification::getByKey('settings.seo.section.description'))
                    ->schema([
                        TextInput::make('title')
                            ->label('SEO Title')
                            ->placeholder('simedkom')
                            ->autofocus()
                            ->autocomplete(false)
                            ->helperText('Judul yang muncul di tab browser dan hasil pencarian.'),

                        Textarea::make('description')
                            ->label('SEO Description')
                            ->placeholder('...')
                            ->autocomplete(false)
                            ->helperText('Deskripsi singkat website Anda.'),

                        TextInput::make('keywords')
                            ->label('SEO Keywords')
                            ->placeholder('keyword1, keyword2, keyword3')
                            ->autocomplete(false)
                            ->helperText('Gunakan koma untuk memisahkan kata kunci.'),
                    ])
                    ->columnSpanFull(),
            ]);
    }
}
