<?= Form::open(['id' => 'addRuleGroupForm']) ?>
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="popup">&times;</button>
        <h4 class="modal-title"><?= e(trans('winter.notify::lang.notifications.add_notification_rule')) ?></h4>
    </div>
    <div class="modal-body">

        <?php if ($this->fatalError): ?>
            <p class="flash-message static error"><?= $fatalError ?></p>
        <?php else: ?>

            <div class="list-preview">
                <div class="control-simplelist is-selectable-box is-scrollable size-large" data-control="simplelist">
                    <ul>
                        <?php foreach ($eventGroups as $code => $group): ?>

                            <li>
                                <a
                                    href="javascript:;"
                                    data-control="popup"
                                    data-handler="onLoadRuleEventForm"
                                    data-request-data="code: '<?= e($code) ?>'"
                                    data-dismiss="popup"
                                    >
                                    <div class="box">
                                        <div class="image"><i class="<?= e(array_get($group, 'icon')) ?>"></i></div>
                                    </div>
                                    <h5 class="heading"><?= e(trans(array_get($group, 'label'))) ?></h5>
                                </a>
                            </li>

                        <?php endforeach ?>
                    </ul>
                </div>
            </div>

        <?php endif ?>

    </div>

    <div class="modal-footer">
        <button
            type="button"
            class="btn btn-default"
            data-dismiss="popup">
            <?= e(trans('backend::lang.form.cancel')) ?>
        </button>
    </div>
<?= Form::close() ?>
