<x-ui.modal>
    <div class="flex items-center justify-between">
        <h3 class="text-base font-semibold text-ink">{{ __('plans.marketing_title') }}</h3>
        <span class="rounded bg-surface-2 px-2 py-0.5 font-mono text-xs text-muted">{{ $family->name }}</span>
    </div>

    <div class="mt-4 space-y-4">
        <div>
            <label class="text-sm font-medium text-body" for="pf-audience">{{ __('plans.audience') }}</label>
            <input id="pf-audience" type="text" wire:model="audience" placeholder="{{ __('plans.audience_placeholder') }}"
                   class="mt-1.5 w-full rounded-md border border-line-strong bg-surface px-3 py-2 text-sm text-ink" />
            <p class="mt-1 text-xs text-muted">{{ __('plans.audience_hint') }}</p>
            @error('audience')<p class="mt-1 text-xs text-danger">{{ $message }}</p>@enderror
        </div>
        <div>
            <label class="text-sm font-medium text-body" for="pf-note">{{ __('plans.note') }}</label>
            <textarea id="pf-note" wire:model="note" rows="3"
                      class="mt-1.5 w-full rounded-md border border-line-strong bg-surface px-3 py-2 text-sm text-ink"></textarea>
            <p class="mt-1 text-xs text-muted">{{ __('plans.note_hint') }}</p>
            @error('note')<p class="mt-1 text-xs text-danger">{{ $message }}</p>@enderror
        </div>
    </div>

    <div class="mt-5 rounded-lg border border-line bg-surface-2 p-4">
        <x-ui.checkbox name="recommended" wire:model="recommended" :label="__('plans.recommended_label')" />
        <p class="mt-1.5 pl-7 text-xs text-muted">{{ __('plans.recommended_hint') }}</p>
    </div>

    <x-slot:footer>
        <div class="flex justify-end gap-3">
            <x-ui.button variant="secondary" x-on:click="Livewire.dispatch('closeModal')">{{ __('plans.cancel') }}</x-ui.button>
            <x-ui.button variant="primary" wire:click="save" wire:loading.attr="disabled">{{ __('plans.save') }}</x-ui.button>
        </div>
    </x-slot:footer>
</x-ui.modal>
