<?php

declare(strict_types=1);

namespace CpCreation\VitiCore\PageBuilder\Block\Type;

use CpCreation\VitiCore\PageBuilder\Block\BlockTypeInterface;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;

#[AutoconfigureTag('viti-core.page_builder.block_type')]
final class TextMediaBlockType implements BlockTypeInterface
{
    public const CODE = 'text_media';

    public function getCode(): string
    {
        return self::CODE;
    }

    public function getLabel(): string
    {
        return 'Texte + media';
    }

    public function getInlineEditableFields(): array
    {
        return ['eyebrow', 'title', 'body', 'primaryCtaLabel'];
    }

    public function getSidebarEditableFields(): array
    {
        return ['image', 'primaryCtaUrl', 'settings.mediaPosition', 'settings.variant'];
    }

    public function getDefaultSettings(): array
    {
        return [
            'mediaPosition' => 'start',
            'variant' => 'editorial',
        ];
    }
}
