<?php

namespace Symfony\Config\SuluForm\Mail;

use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;

/**
 * This class is automatically generated to help in creating a config.
 */
class TemplatesConfig 
{
    private $notify;
    private $notifyPlainText;
    private $customer;
    private $customerPlainText;
    private $_usedProperties = [];

    /**
     * @default '@SuluForm/mails/notify.html.twig'
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function notify($value): static
    {
        $this->_usedProperties['notify'] = true;
        $this->notify = $value;

        return $this;
    }

    /**
     * @default '@SuluForm/mails/notify_plain_text.html.twig'
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function notifyPlainText($value): static
    {
        $this->_usedProperties['notifyPlainText'] = true;
        $this->notifyPlainText = $value;

        return $this;
    }

    /**
     * @default '@SuluForm/mails/customer.html.twig'
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function customer($value): static
    {
        $this->_usedProperties['customer'] = true;
        $this->customer = $value;

        return $this;
    }

    /**
     * @default '@SuluForm/mails/customer_plain_text.html.twig'
     * @param ParamConfigurator|mixed $value
     * @return $this
     */
    public function customerPlainText($value): static
    {
        $this->_usedProperties['customerPlainText'] = true;
        $this->customerPlainText = $value;

        return $this;
    }

    public function __construct(array $value = [])
    {
        if (array_key_exists('notify', $value)) {
            $this->_usedProperties['notify'] = true;
            $this->notify = $value['notify'];
            unset($value['notify']);
        }

        if (array_key_exists('notify_plain_text', $value)) {
            $this->_usedProperties['notifyPlainText'] = true;
            $this->notifyPlainText = $value['notify_plain_text'];
            unset($value['notify_plain_text']);
        }

        if (array_key_exists('customer', $value)) {
            $this->_usedProperties['customer'] = true;
            $this->customer = $value['customer'];
            unset($value['customer']);
        }

        if (array_key_exists('customer_plain_text', $value)) {
            $this->_usedProperties['customerPlainText'] = true;
            $this->customerPlainText = $value['customer_plain_text'];
            unset($value['customer_plain_text']);
        }

        if ([] !== $value) {
            throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
        }
    }

    public function toArray(): array
    {
        $output = [];
        if (isset($this->_usedProperties['notify'])) {
            $output['notify'] = $this->notify;
        }
        if (isset($this->_usedProperties['notifyPlainText'])) {
            $output['notify_plain_text'] = $this->notifyPlainText;
        }
        if (isset($this->_usedProperties['customer'])) {
            $output['customer'] = $this->customer;
        }
        if (isset($this->_usedProperties['customerPlainText'])) {
            $output['customer_plain_text'] = $this->customerPlainText;
        }

        return $output;
    }

}
