@php $leftButtons = $data['left_buttons'] ?? []; $rightButtons = $data['right_buttons'] ?? []; $friendlyIcons = [ 'fa fa-star' => 'Estrela', 'bi bi-info-circle-fill' => 'Informação', 'fa fa-check-circle' => 'Sucesso/Check', 'fa fa-exclamation-circle' => 'Alerta', 'fa fa-phone' => 'Telefone', 'fa fa-envelope' => 'E-mail', 'fa fa-calendar' => 'Calendário', 'fa fa-user' => 'Usuário', 'fa fa-map-marker' => 'Localização', 'fa fa-file-text-o' => 'Documento', 'fa fa-globe' => 'Globo/Internet', 'fa fa-shield' => 'Segurança', 'fa fa-cogs' => 'Configurações', 'fa fa-trophy' => 'Troféu', 'fa fa-university' => 'Governo/Institucional', 'fa fa-money' => 'Financeiro', 'fa fa-bullhorn' => 'Notícias/Avisos', 'fa fa-question-circle' => 'Ajuda/FAQ', 'fa fa-cube' => 'Cubo/Módulo', 'bi bi-link-45deg' => 'Link/Conexão', 'fa fa-terminal' => 'Terminal/Linha de Comando', 'fa fa-sliders' => 'Controles/Sliders', ]; @endphp
{!! Form::label('parameters[background_color]', 'Cor de Fundo da Barra', ['for' => 'command-line-bg-color-hex']) !!}
{!! Form::text('parameters[background_color]', $data['background_color'] ?? '#ffffff', ['class' => 'form-control', 'id' => 'command-line-bg-color-hex', 'placeholder' => 'Ex: #ffffff']) !!}

{{-- Lado Esquerdo --}}

Botões à Esquerda

@foreach($leftButtons as $index => $btn)
{!! Form::text("parameters[left_buttons][$index][text]", $btn['text'] ?? '', ['class' => 'form-control', 'id' => "command-left-text-$index", 'placeholder' => 'Digite o texto', 'required' => 'required', 'aria-required' => 'true']) !!}
{!! Form::select("parameters[left_buttons][$index][style]", ['limpo' => 'Limpo', 'padrao' => 'Padrão'], $btn['style'] ?? 'limpo', ['class' => 'form-select', 'id' => "command-left-style-$index"]) !!}
{!! Form::select("parameters[left_buttons][$index][icon]", $friendlyIcons, $btn['icon'] ?? 'fa fa-circle', ['class' => 'form-select icon-selector', 'id' => "command-left-icon-$index", 'required' => 'required', 'aria-required' => 'true']) !!}
{!! Form::text("parameters[left_buttons][$index][link]", $btn['link'] ?? '', ['class' => 'form-control', 'id' => "command-left-link-$index", 'placeholder' => 'Ex: /link ou https://...']) !!}
@endforeach
{{-- Lado Direito --}}

Botões à Direita

@foreach($rightButtons as $index => $btn)
{!! Form::text("parameters[right_buttons][$index][text]", $btn['text'] ?? '', ['class' => 'form-control', 'id' => "command-right-text-$index", 'placeholder' => 'Digite o texto', 'required' => 'required', 'aria-required' => 'true']) !!}
{!! Form::select("parameters[right_buttons][$index][style]", ['limpo' => 'Limpo', 'padrao' => 'Padrão'], $btn['style'] ?? 'limpo', ['class' => 'form-select', 'id' => "command-right-style-$index"]) !!}
{!! Form::select("parameters[right_buttons][$index][icon]", $friendlyIcons, $btn['icon'] ?? 'fa fa-circle', ['class' => 'form-select icon-selector', 'id' => "command-right-icon-$index", 'required' => 'required', 'aria-required' => 'true']) !!}
{!! Form::text("parameters[right_buttons][$index][link]", $btn['link'] ?? '', ['class' => 'form-control', 'id' => "command-right-link-$index", 'placeholder' => 'Ex: /link ou https://...']) !!}
@endforeach
{{-- Template para clonagem --}}