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