<?php

declare(strict_types=1);

namespace App\Filament\Components\Form;

use Filament\Forms\Components\FileUpload;

class OfferIconFileUpload extends FileUpload
{
    public static function create(): static
    {
        return parent::make('offer_icon')
            ->label('آیکون پیشنهاد')
            ->image()
            ->imageEditor()
            ->directory('categories/icons')
            ->maxSize(1024)
            ->acceptedFileTypes(['image/svg+xml', 'image/png', 'image/jpeg'])
            ->helperText('Upload an icon image (SVG, PNG, or JPEG, max 1MB)')
            ->columnSpan(6);
    }
}
