<?php

namespace App\Filament\Pages;

use Filament\Forms\Components\FileUpload;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Schemas\Schema;
use Filament\Pages\SettingsPage;
use App\Settings\GeneralSettings as Settings;

class GeneralSettings extends SettingsPage
{
    protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-cog-6-tooth';

    protected static string $settings = Settings::class;

    public function form(Schema $schema): Schema
    {
        return $schema
            ->components([
                TextInput::make('marquee_text')
                    ->required(),
                TextInput::make('about_title')
                    ->required(),
                Textarea::make('about_text')
                    ->required(),
                FileUpload::make('about_image')
                    ->image()
                    ->visibility('public')
                    ->directory('settings'),
                Textarea::make('footer_address')
                    ->required(),
                TextInput::make('footer_phone')
                    ->required(),
                TextInput::make('footer_copyright')
                    ->required(),
            ]);
    }
}
