import{j as e}from"./vendor-mui-69397583.js";import{D as b,B as t,a5 as s,bq as j,bJ as p,aU as g,bp as N}from"./index-c62ac197.js";const f=({status:a})=>{switch(a){case"info":return e.jsx(s,{className:"bg-blue-100 text-blue-600 dark:bg-blue-500/20 dark:text-blue-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(N,{})})});case"success":return e.jsx(s,{className:"bg-emerald-100 text-emerald-600 dark:bg-emerald-500/20 dark:text-emerald-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(g,{})})});case"warning":return e.jsx(s,{className:"text-amber-600 bg-amber-100 dark:text-amber-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(p,{})})});case"danger":return e.jsx(s,{className:"text-red-600 bg-red-100 dark:text-red-100",shape:"circle",children:e.jsx("span",{className:"text-2xl",children:e.jsx(j,{})})});default:return null}},D=a=>{const{type:n="info",title:c,children:i,onCancel:r,onConfirm:l,cancelText:x="Cancel",confirmText:d="Confirm",confirmButtonColor:o,...m}=a,h=()=>{r==null||r()},u=()=>{l==null||l()};return e.jsxs(b,{contentClassName:"pb-0 px-0",...m,children:[e.jsxs("div",{className:"px-6 pb-6 pt-2 flex",children:[e.jsx("div",{children:e.jsx(f,{status:n})}),e.jsxs("div",{className:"ml-4 rtl:mr-4",children:[e.jsx("h5",{className:"mb-2",children:c}),i]})]}),e.jsxs("div",{className:"text-right px-6 py-3 bg-gray-100 dark:bg-gray-700 rounded-bl-lg rounded-br-lg",children:[e.jsx(t,{size:"sm",className:"ltr:mr-2 rtl:ml-2",onClick:h,children:x}),e.jsx(t,{size:"sm",variant:"solid",color:o,onClick:u,children:d})]})]})};export{D as C};
