<?php

namespace KupShop\AutomationConfiguratorBundle\Configurator\BuilderDefinitions\TriggersActions;

class TrigActDefinitionMessage extends TrigActDefinitionField
{
    public const TYPE = 'message';

    protected string $name = '';
    protected string $title = '';
    protected string $value = '';

    public function setValue(string $value): TrigActDefinitionMessage
    {
        $this->value = $value;

        return $this;
    }

    public function build(): array
    {
        return array_merge(parent::build(), array_filter(['value' => $this->value]));
    }
}
