'use strict';

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

const core = require('./core-c57a47e8.js');

const MaterialsDialogController = class {
    constructor(hostRef) {
        core.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;
