import { r as registerInstance } from './chunk-2123d8c1.js';

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

export { MaterialsDialogController as materials_dialog_controller };
