import { r as registerInstance } from './index-0b18a276.js';

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

export { MaterialsDialogController as materials_dialog_controller };
