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