<x-admin-app-layout>
    <div class="white-box">
        <x-admin::page-header title="{{ __('Send Email') }}" :isFilterable="false" />
        <div class="white-box">
            <form action="{{ route('admin.subscriptions.store') }}" method="POST" class="space-y-6 form-submit-add">
                @csrf
                <div class="flex flex-col gap-4">
                    <x-admin::label for="template_id">{{ __('Select Email Template') }}</x-admin::label>
                    <x-admin::select-option id="template_id2" name="template_id">
                        <option value="">{{ __('Select Email Template') }}</option>
                        @foreach ($notification_templates as $template)
                            <option value="{{ $template->id }}">{{ $template->name }}</option>
                        @endforeach
                    </x-admin::select-option>
                    <x-admin::input-error name="template_id" />
                </div>
                <x-admin::text-input-group name="subject" label="Subject" />

                <x-admin::editor label="Email Body" name="message" id="email_body_editor" :errors="$errors" />

                <div class="flex gap-4">
                    <x-admin::primary-button type="submit">
                        {{ __('Send') }}
                    </x-admin::primary-button>
                </div>
            </form>
        </div>
    </div>
    @push('scripts')
        @vite('resources/admin/js/manage-user/send-notification.js')
    @endpush
</x-admin-app-layout>
