'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-42b107ae.js');

const MaterialsDialogController = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
    }
    /** Create a HTMLMaterialsDialogElement and returns it */
    async create(opts) {
        const dialog = document.createElement('materials-dialog');
        dialog.dialogTitle = opts.title;
        dialog.actions = opts.actions;
        dialog.body = opts.body;
        dialog.closeButton = opts.closeButton;
        dialog.addEventListener('accept', () => dialog.remove());
        dialog.addEventListener('cancel', () => dialog.remove());
        document.body.appendChild(dialog);
        return dialog;
    }
};

exports.materials_dialog_controller = MaterialsDialogController;
