<?php

namespace App\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TelType;
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 ContactType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder
            ->add('contact',TextType::class,[
                'label'=>false,
                'attr'=>[
                    'class'=>'w-100 inputContact ',
                    'placeholder' => ' Contact'
                ]
            ])
            ->add('entreprise',TextType::class,[
                'label'=>false,
                'attr'=>[
                    'class'=>'w-100 inputContact ',
                    'placeholder' => ' Entreprise'
                ]
            ])
            ->add('fonction',TextType::class,[
                'label'=>false,
                'attr'=>[
                    'class'=>'w-100 inputContact ',
                    'placeholder' => ' Fonction'
                ]
            ])
            ->add('tel',TelType::class,[
                'label'=>false,
                'attr'=>[
                    'class'=>'w-100 inputContact ',
                    'placeholder' => ' Tél'
                ],
                'required'=>true,
            ])
            ->add('email',EmailType::class,[
                'label'=>false,
                'attr'=>[
                    'class'=>'w-100 inputContact ',
                    'placeholder' => ' Mail'
                ]
            ])
            ->add('objet',TextType::class,[
                'label'=>false,
                'attr'=>[
                    'class'=>'w-100 inputContact ',
                    'placeholder' => 'Objet'
                ]
            ])
            ->add('message',TextareaType::class,[
                'label'=>false,
                'attr'=>[
                    'class'=>'w-100 inputContact  message',
                    'placeholder' => ' Message',
                    'rows'=>"8",
                ],
            ])
            ->add('envoyer',SubmitType::class,[
                'attr'=>[
                    'class'=>'send  btn-sm w-100 text-start border-0 inputSend '
                ]
            ])
        ;
    }

    public function configureOptions(OptionsResolver $resolver): void
    {
        $resolver->setDefaults([
            // Configure your form options here
        ]);
    }
}