import{$ as e,y as t}from"./Fade-Bj1YUcWe.js";import{t as n}from"./Box-BoFhqo9n.js";import{t as r}from"./useMediaQuery-D3QrrE_7.js";import{i}from"./Menu-DT9JOTRT.js";import{t as a}from"./Button-uK26k-ET.js";import{t as o}from"./CircularProgress-zVZJTwOj.js";import{r as s,t as c}from"./DialogContent-1cFv81I0.js";import{n as l,t as u}from"./DialogTitle-C0Sfw4o6.js";import{t as d}from"./DialogContentText-C5CkgX0W.js";var f=e();function p({open:e,title:p,content:m,confirmText:h=`确认`,confirmColor:g=`primary`,loading:_=!1,onClose:v,onConfirm:y}){let b=r(t().breakpoints.down(`sm`));return(0,f.jsxs)(s,{open:e,onClose:()=>!_&&v(),fullWidth:!0,maxWidth:`xs`,TransitionComponent:i,PaperProps:{sx:{borderRadius:{xs:2,sm:`12px`}}},children:[(0,f.jsx)(u,{sx:{fontWeight:700},children:p}),(0,f.jsx)(c,{children:(0,f.jsx)(d,{color:`text.secondary`,children:m})}),(0,f.jsx)(l,{sx:{px:3,pb:2},children:(0,f.jsxs)(n,{sx:{display:`flex`,gap:1.5,width:b?`100%`:`auto`,flexDirection:b?`column-reverse`:`row`,justifyContent:`flex-end`},children:[(0,f.jsx)(a,{onClick:v,color:`inherit`,disabled:_,fullWidth:b,sx:{textTransform:`none`,borderRadius:2},children:`取消`}),(0,f.jsx)(a,{onClick:y,variant:`contained`,color:g,disabled:_,fullWidth:b,startIcon:_?(0,f.jsx)(o,{size:16,color:`inherit`}):void 0,sx:{textTransform:`none`,borderRadius:2},children:_?`处理中...`:h})]})})]})}export{p as t};