<?php

use Jet\UI_dialog;
use Jet\MVC_View;

/**
 * @var MVC_View $this
 * @var UI_dialog $d
 */
$d = $this->getRaw( 'element' );

$size_class = match ($d->getSize()) {
	UI_dialog::SIZE_DEFAULT => '',
	UI_dialog::SIZE_SMALL => 'modal-sm',
	UI_dialog::SIZE_LARGE => 'modal-lg',
	UI_dialog::SIZE_EXTRA_LARGE => 'modal-xl',
};

?>
<div class="modal fade" id="<?= $d->getId() ?>" role="dialog">
	<div class="modal-dialog <?= $size_class ?>">

		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title"><?= $d->getTitle() ?></h5>
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
			</div>
			<div class="modal-body">

