@php
$delayOptions = \Acelle\Model\Automation2::getDelayOptions();
$exist = false;
foreach($delayOptions as $deplayOption) {
if ($deplayOption['value'] == $element->getOption('time')) {
$exist = true;
}
}
$moreOptions = [];
if (!$exist && $element->getOption('time')) {
$parts = explode(' ', $element->getOption('time'));
$text = $parts[0] . ' ' . trans_choice('messages.time.' . $parts[1], (int) $parts[0]);
$moreOptions = [['text' => $text, 'value' => $text]];
}
@endphp
@include('helpers.form_control', [
'type' => 'select',
'class' => '',
'label' => '',
'name' => 'time',
'value' => $element->getOption('time'),
'help_class' => 'trigger',
'options' => $automation->getDelayOptions($moreOptions),
'rules' => [],
])