<div class="dku-modal-background" tabindex="0"
     ng-keyup="$event.keyCode == 27 && close()"
     ng-click="close($event)">
    <div class="dku-modal">
        <div class="dku-modal-title">
            <div>{{ title }}</div>
            <i class="icon icon-grey icon-remove" ng-click="close()"></i>
        </div>
        <div class="dku-modal-body">
            <form name="modalForm" ng-submit="modalForm.$valid && confirmAction(promptConfig && promptConfig.result); close()">
                <div ng-include="customBody"></div>
                <p ng-class="{ 'dku-modal-body--error': msgConfig.error }">
                    <span ng-if="msgConfig">{{ msgConfig.msg }}</span>
                </p>
                <div class="dku-modal-form" ng-show="promptConfig">
                    <label for="prompt-input">{{ promptConfig.label }}</label>
                    <input id="prompt-input" focus-here ng-model="promptConfig.result" required>
                </div>
            </form>
        </div>
        <div class="dku-modal-footer">
            <div class="dku-button-modal-div">
                <button type="button" class="dku-button dku-button-modal"
                        ng-if="confirmAction" ng-click="close()">
                    Cancel
                </button>
                <button type="button" class="dku-button dku-button-modal"
                        ng-class="{ 'dku-button--primary': confirmAction && !isDangerousAction, 'dku-button--danger': isDangerousAction }"
                        ng-click="(confirmAction && confirmAction(promptConfig && promptConfig.result)); close();"
                        ng-disabled="promptConfig && modalForm.$invalid">
                    {{ confirmAction ? 'Confirm' : 'Ok' }}
                </button>
            </div>
        </div>
    </div>
</div>
