<?php

namespace App\Domain\Website\Blocks\Types;

use App\Domain\Website\Blocks\BlockField;
use App\Domain\Website\Blocks\BlockType;
use App\Domain\Website\Enums\BlockCategory;

/** Separator between sections — includes the shaped dividers their site uses. */
class DividerBlock extends BlockType
{
    public function key(): string
    {
        return 'divider';
    }

    public function label(): string
    {
        return 'فاصل';
    }

    public function icon(): string
    {
        return 'minus';
    }

    public function category(): BlockCategory
    {
        return BlockCategory::Layout;
    }

    public function variants(): array
    {
        return [
            'line' => 'خط',
            'wave' => 'موجة',
            'angle' => 'مائل',
            'curve' => 'منحنى',
            'zigzag' => 'متعرج',
            'dots' => 'نقاط',
        ];
    }

    public function fields(): array
    {
        return [
            BlockField::color('color', 'اللون'),
            BlockField::select('size', 'الحجم', [
                'sm' => 'صغير', 'md' => 'متوسط', 'lg' => 'كبير',
            ])->default('md'),
            BlockField::toggle('flip', 'قلب رأسي'),
        ];
    }
}
