@props([ 'showHeading' => true, 'variant' => 'auto', 'defaultCategoryId' => null, 'defaultSubject' => null, 'sourceType' => 'general', 'sourceId' => null, ]) @php $min = (int) config('site.lead_form_min_body', 10); $dark = match ($variant) { 'dark' => true, 'light' => false, default => site_theme() !== 'light', }; $inp = $dark ? 'site-lead-input' : 'mt-2 block w-full rounded-xl border border-slate-300 bg-white px-4 py-2.5 text-sm shadow-inner focus:border-brand-accent focus:ring-brand-accent'; $lbl = $dark ? 'site-lead-label' : 'text-xs font-semibold uppercase tracking-wide text-brand-muted'; $muted = $dark ? 'text-slate-300' : 'text-brand-muted'; $comboboxList = $dark ? 'site-lead-combobox-list' : 'absolute z-30 mt-1 max-h-56 w-full list-none overflow-auto rounded-xl border border-slate-200 bg-white py-1 text-sm text-slate-900 shadow-lg'; $comboboxOption = $dark ? 'site-lead-combobox-option' : 'flex w-full flex-col px-4 py-2 text-start hover:bg-slate-50'; $comboboxOptionMuted = $dark ? 'text-xs text-slate-400' : 'text-xs text-brand-muted'; $comboboxEmpty = $dark ? 'site-lead-combobox-empty' : 'absolute z-30 mt-1 w-full rounded-xl border border-slate-200 bg-white px-4 py-3 text-xs text-brand-muted shadow-lg'; $categoriesUrl = route('site.lead.categories', ['locale' => app()->getLocale()]); $selectedCategoryId = old('category_id', $defaultCategoryId); $subjectValue = old('subject', $defaultSubject); $initialCategoryLabel = old('category_label'); @endphp
@if ($showHeading)

{{ __('site.lead_title') }}

{{ __('site.cta_request') }}

@endif
@csrf

{{ __('site.lead_category_loading') }}

{{ __('site.lead_category_empty') }}

@error('category_id')

{{ $message }}

@enderror

{{ __('validation.min.string', ['attribute' => __('site.lead_body'), 'min' => $min]) }}

@error('body')

{{ $message }}

@enderror