import{cF as y,cG as _,f as b,T as f,cI as A,r as M,cJ as R,j as e,cL as S,cM as E,E as u,q as k,B as z}from"./index-7d3dbb9c.js";import{i as x}from"./index-e9cb9551.js";import{r as h}from"./createSvgIcon-d159d1d4.js";import{D as v}from"./Dialog-d125aee1.js";import{A as I}from"./Alert-570caa27.js";import{D as j}from"./DialogContent-d34f4ba4.js";import{D as $}from"./DialogContentText-9128b573.js";import{D as g}from"./DialogActions-99629c3a.js";import{D as q}from"./DialogTitle-a3176c12.js";function w(t){return y("MuiAlertTitle",t)}_("MuiAlertTitle",["root"]);const P=t=>{const{classes:s}=t;return E({root:["root"]},w,s)},W=b(f,{name:"MuiAlertTitle",slot:"Root"})(A(({theme:t})=>({fontWeight:t.typography.fontWeightMedium,marginTop:-2}))),B=M.forwardRef(function(s,i){const r=R({props:s,name:"MuiAlertTitle"}),{className:o,...n}=r,a=r,l=P(a);return e.jsx(W,{gutterBottom:!0,component:"div",ownerState:a,ref:i,className:S(l.root,o),...n})}),U=B;var d={},K=x;Object.defineProperty(d,"__esModule",{value:!0});var C=d.default=void 0,L=K(h()),O=e,F=(0,L.default)((0,O.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");C=d.default=F;var m={},N=x;Object.defineProperty(m,"__esModule",{value:!0});var D=m.default=void 0,G=N(h()),J=e,V=(0,G.default)((0,J.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error");D=m.default=V;const oe=({isOpen:t,title:s,context:i,onClose:r,onOK:o,okText:n,closeText:a,status:l})=>e.jsx(v,{open:t,onClose:(p,c)=>{c==="backdropClick"||c==="escapeKeyDown"||r==null||r()},disableEscapeKeyDown:!0,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:e.jsxs(I,{severity:l,children:[e.jsx(U,{children:s}),e.jsx(j,{children:e.jsx($,{id:"alert-dialog-description",children:i})}),e.jsxs(g,{children:[e.jsx(u,{onClick:r,color:"success",variant:"outlined",children:a}),e.jsx(u,{onClick:o,color:"success",autoFocus:!0,variant:"outlined",children:n})]})]})}),ae=({open:t,onClose:s,title:i,message:r,type:o,actionText:n="OK",onAction:a})=>{const l=k(),p=o==="success"?l.palette.success.main:l.palette.error.main,c=o==="success"?C:D,T=o==="success"?"Success":"Error";return e.jsx(v,{open:t,onClose:s,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{borderRadius:3,p:2}},children:e.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",textAlign:"center",children:[e.jsx(c,{sx:{fontSize:60,color:p,mb:1}}),e.jsx(q,{sx:{fontWeight:"bold",fontSize:22},children:i||T}),e.jsx(j,{children:e.jsx(f,{variant:"body1",color:"text.secondary",children:r})}),e.jsx(g,{sx:{justifyContent:"center",pb:2},children:e.jsx(u,{onClick:()=>{s(),a&&a()},variant:"contained",color:o==="success"?"success":"error",sx:{borderRadius:2,px:4,textTransform:"none"},children:n})})]})})};export{ae as C,oe as a};
