{{ $pageTitle ?? __('messages.list') }}
{{ __('messages.back') }}
{{ html()->form('PATCH', route('notification-templates.update', $data->id))->attribute('button-loader', 'true') ->open() }} {{ html()->hidden('id',$data->id ?? null) }} {{ html()->hidden('type', $data->type ?? null) }} {{ html()->hidden('defaultNotificationTemplateMap[template_id]', $data->id ?? null) }}

@php $toValues = json_decode($data->to, true) ?? []; @endphp {{ html()->label(__('messages.user_type') . ': *', 'user_type')->class('form-control-label') }} {{ html()->select('defaultNotificationTemplateMap[user_type]', $toValues, null)->class('form-select select2js')->id('userTypeSelect')->required() }}
{{ html()->label(trans('messages.status') . ':', 'status')->class('form-control-label') }} {{ html()->select('status', ['1' => __('messages.active'), '0' => __('messages.inactive')],$data->status )->id('role')->class('form-select select2js')->required() }}

@if(isset($buttonTypes)) @include('notificationtemplates.perameters-buttons',['buttonTypes' => $buttonTypes]) @endif

{{ __('messages.notification_template') }}

{{ html()->hidden('defaultNotificationTemplateMap[language]', 'en') }}
{{ html()->textarea('defaultNotificationTemplateMap[template_detail]')->class('form-control textarea tinymce-template')->id('notification_mytextarea') }}

{{ __('messages.mail_template') }}

{{ html()->text('defaultNotificationTemplateMap[mail_subject]',$data->defaultNotificationTemplateMap['mail_subject'] ?? '')->class('form-control') }} {{ html()->hidden('defaultNotificationTemplateMap[status]', 1)->class('form-control') }}
{{ html()->hidden('defaultNotificationTemplateMap[language]', 'en') }}
{{ html()->textarea('defaultNotificationTemplateMap[mail_template_detail]')->class('form-control textarea tinymce-template')->id('mail_mytextarea') }}

{{ __('messages.sms_template') }}

{{ html()->text('defaultNotificationTemplateMap[sms_subject]',$data->defaultNotificationTemplateMap['sms_subject'] ?? '')->class('form-control') }} {{ html()->hidden('defaultNotificationTemplateMap[status]', 1)->class('form-control') }}
{{ html()->hidden('defaultNotificationTemplateMap[language]', 'en') }}
{{ html()->textarea('defaultNotificationTemplateMap[sms_template_detail]')->class('form-control textarea tinymce-template')->id('sms_mytextarea') }}

{{ __('messages.whatsapp_template') }}

{{ html()->text('defaultNotificationTemplateMap[whatsapp_subject]',$data->defaultNotificationTemplateMap['whatsapp_subject'] ?? '')->class('form-control') }} {{ html()->hidden('defaultNotificationTemplateMap[status]', 1)->class('form-control') }}
{{ html()->hidden('defaultNotificationTemplateMap[language]', 'en') }}
{{ html()->textarea('defaultNotificationTemplateMap[whatsapp_template_detail]')->class('form-control textarea tinymce-template')->id('whatsapp_mytextarea') }}
{{ html()->form()->close() }}
@section('bottom_script') @endsection