import{r as c}from"./p-5a5e7c99.js";const a=class{constructor(a){c(this,a)}async create(c){const a=document.createElement("materials-dialog");return a.dialogTitle=c.title,a.actions=[],c.cancelText&&a.actions.push({label:c.cancelText,role:"close",action:c.onCancel}),a.actions.push({label:c.acceptText,role:"accept",action:c.onAccept}),a.body=c.message,a.addEventListener("accept",()=>a.remove()),a.addEventListener("cancel",()=>a.remove()),document.body.appendChild(a),a}};export{a as materials_alert_controller};