@props([
'id' => null,
'title' => null,
'blur' => true,
'closeButton' => true,
'size' => null,
'bodyClass' => null,
'bodyAttrs' => [],
'formAction' => null,
'formMethod' => 'POST',
'formAttrs' => [],
'hasForm' => false,
'type' => null,
'buttonId' => null,
'buttonClass' => null,
'buttonLabel' => null,
'centered' => true,
'scrollable' => true,
])
@php
$classes = Arr::toCssClasses(['modal', 'fade', 'modal-blur' => $blur]);
$hasForm = $hasForm || $formAction;
$modalContentAttributes = ['class' => rtrim('modal-content ' . Arr::get($formAttrs, 'class'))];
@endphp
merge(['id' => $id, 'class' => $classes])->class($classes) }}
tabindex="-1"
role="dialog"
aria-hidden="true"
data-select2-dropdown-parent="true"
>
$centered,
'modal-dialog-scrollable' => $scrollable,
$size ? "modal-$size" : null,
])
role="document"
>
<{{ $hasForm ? 'form' : 'div' }}
{!! Html::attributes($modalContentAttributes) !!}
@if ($hasForm)
action="{{ $formAction }}"
method="{{ $formMethod }}"
{!! Html::attributes($formAttrs) !!}
@endif
>
@if ($hasForm)
@csrf
@endif
@if ($title || $closeButton)
@endif
@if($type)
@endif
@if ($slot->isNotEmpty())
rtrim('modal-body ' . Arr::get($bodyAttrs, 'class'))])) !!}>
{{ $slot }}
@else
{{ $slot }}
@endif
@if (!empty($footer) && $footer->isNotEmpty())
@endif
@if($buttonId && $buttonLabel)
@endif
{{ $hasForm ? 'form' : 'div' }}>