@php
use Rawilk\FilamentQuill\Enums\ToolbarButton;
$textColors = $getTextColors();
$backgroundColors = $getBackgroundColors();
$placeholders = $getPlaceholders();
@endphp
@if ($hasStickyToolbar)
{{--
To prevent the "sticky" class being added/removed rapidly with the intersection
observer, we're going to attach the observer to a dummy element instead.
--}}
@endif
@if ($hasToolbarButton([ToolbarButton::Font, ToolbarButton::Size]))
@if ($hasToolbarButton(ToolbarButton::Font))
@if (is_array($fonts) && count($fonts))
@foreach ($fonts as $font)
@endforeach
@endif
@endif
@if ($hasToolbarButton(ToolbarButton::Size))
@foreach ($fontSizes as $fontSize)
@endforeach
@endif
@endif
@if ($hasToolbarButton([ToolbarButton::Bold, ToolbarButton::Italic, ToolbarButton::Underline, ToolbarButton::Strike]))
@if ($hasToolbarButton(ToolbarButton::Bold))
@endif
@if ($hasToolbarButton(ToolbarButton::Italic))
@endif
@if ($hasToolbarButton(ToolbarButton::Underline))
@endif
@if ($hasToolbarButton(ToolbarButton::Strike))
@endif
@endif
@if ($hasToolbarButton([ToolbarButton::TextColor, ToolbarButton::BackgroundColor]))
@if ($hasToolbarButton(ToolbarButton::TextColor))
@if (is_array($textColors) && count($textColors))
@foreach ($textColors as $color)
@endforeach
@endif
@endif
@if ($hasToolbarButton(ToolbarButton::BackgroundColor))
@if (is_array($backgroundColors) && count($backgroundColors))
@foreach ($backgroundColors as $color)
@endforeach
@endif
@endif
@endif
@if ($hasToolbarButton(ToolbarButton::Scripts))
@endif
@if ($hasToolbarButton([ToolbarButton::BlockQuote, ToolbarButton::CodeBlock]))
@if ($hasToolbarButton(ToolbarButton::BlockQuote))
@endif
@if ($hasToolbarButton(ToolbarButton::CodeBlock))
@endif
@endif
@if ($hasToolbarButton([ToolbarButton::OrderedList, ToolbarButton::UnorderedList, ToolbarButton::Indent]))
@if ($hasToolbarButton(ToolbarButton::OrderedList))
@endif
@if ($hasToolbarButton(ToolbarButton::UnorderedList))
@endif
@if ($hasToolbarButton(ToolbarButton::Indent))
@endif
@endif
@if ($hasToolbarButton(ToolbarButton::TextAlign))
@endif
@if ($hasToolbarButton([ToolbarButton::Link, ToolbarButton::Image]))
@if ($hasToolbarButton(ToolbarButton::Link))
@endif
@if ($hasToolbarButton(ToolbarButton::Image))
@endif
@endif
@if ($hasToolbarButton(ToolbarButton::ClearFormat))
@endif
@if ($hasToolbarButton([ToolbarButton::Undo, ToolbarButton::Redo]))
@if ($hasToolbarButton(ToolbarButton::Undo))
@endif
@if ($hasToolbarButton(ToolbarButton::Redo))
@endif
@endif
@if (is_array($placeholders) && count($placeholders))
{{-- empty option here so the editor doesn't auto select the first option --}}
@foreach ($placeholders as $placeholder)
@endforeach
@endif
@foreach ($getCustomToolbarButtons() as $name => $button)
@php
$options = $button['options'] ?? [];
@endphp
@if (filled($options))
! $button['showSelected'],
])
>
@foreach ($options as $optionValue => $optionLabel)
{{ $optionLabel }}
@endforeach
@else
@endif
@endforeach
@if ($hasToolbarButton(ToolbarButton::Header))
@endif