const Options = require('../../Options').default; const BootstrapDialog = new Class({ Implements: Options, options: { cancelButton: false, closeButton: false, acceptButton: true, removeButton: false, errorMessage: false, onEventData: {}, }, initialize(title, options) { this.setOptions(options); this.options.onEventData.dialog = this; this._native = $('').append(''); const content = $(''); const header = this._buildHeader(title); if (header) { content.append(header); } const body = $(''); if (this.options.errorMessage) { const error = $('
'); error.hide(); body.append(error); } content.append(body); const footer = this._buildFooter(); if (footer) { content.append(footer); } this._native.find('.modal-dialog').append(content); this._native.on('hidden.bs.modal', function () { $(this).remove(); }); this._native.on('shown.bs.modal', this.onDialogShown); }, _buildFooter() { let footer = null; if (this.options.acceptButton || this.options.removeButton || this.options.cancelButton) { footer = $('