'use strict';

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

const __chunk_1 = require('./chunk-c92d86f4.js');

class MaterialsDialogController {
    constructor(hostRef) {
        __chunk_1.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.addEventListener('accept', () => dialog.remove());
        dialog.addEventListener('cancel', () => dialog.remove());
        document.body.appendChild(dialog);
        return dialog;
    }
}

exports.materials_dialog_controller = MaterialsDialogController;
