export class MaterialsDialogController {
    /** 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;
    }
    static get is() { return "materials-dialog-controller"; }
    static get encapsulation() { return "shadow"; }
    static get methods() { return {
        "create": {
            "complexType": {
                "signature": "(opts: DialogOpts) => Promise<HTMLMaterialsDialogElement>",
                "parameters": [{
                        "tags": [],
                        "text": ""
                    }],
                "references": {
                    "Promise": {
                        "location": "global"
                    },
                    "HTMLMaterialsDialogElement": {
                        "location": "global"
                    },
                    "DialogOpts": {
                        "location": "import",
                        "path": "./dialog-opts"
                    }
                },
                "return": "Promise<HTMLMaterialsDialogElement>"
            },
            "docs": {
                "text": "Create a HTMLMaterialsDialogElement and returns it",
                "tags": []
            }
        }
    }; }
}
