<?php

namespace Lc\SovBundle\Definition\Field\Newsletter;

use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
use Lc\SovBundle\Field\BooleanField;
use Lc\SovBundle\Field\CKEditorField;

class NewsletterFieldDefinition extends AbstractFieldDefinition
{
    public function configureIndex(): array
    {
        return [
                'id',
                'title',
                'isMain',
                'status'
        ];
    }

    public function configurePanels(): array
    {
        return ['main', 'seo', 'conf'];
    }

    public function configurePanelMain(): array
    {
        return [
                'title',
                'description',
                'status'
        ];
    }

    public function configureFields(): array
    {
        return [
                'title' => TextField::new('title'),
                'description' => CKEditorField::new('description')->hideOnIndex(),
                'isMain' => BooleanField::new('isMain')->setCustomOption('toggle_label', 'Principale'),
        ];
    }

}