<?php

namespace App\Dto\Ag;

use App\Entity\Ag\Main;
use App\Entity\Ag\MainMember;
use App\Entity\Ag\MainOrder;
use App\Entity\Members;
use App\Repository\MembersRepository;
use Doctrine\ORM\EntityRepository;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class AgOrderType extends AbstractType
{
    public function __construct(private MembersRepository $membersRepository)
    {
    }

    public function buildForm(FormBuilderInterface $builder, array $options)
    {


        $builder
            ->add('title', TextType::class, [
                'label' => 'Titre',
                'required' => true,
            ])

            ->add('description', TextareaType::class, [
                'label' => 'Description',
                'required' => false
            ])
        ;
    }

    public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setDefault('data_class',MainOrder::class);
    }
}
