import{a as e,n as t}from"./react-dom-stZKkA6x.js";import{C as n,E as r,O as i,S as a,T as o,_ as s,b as c,g as l,h as u,m as d,p as f,v as p,w as m,x as h,y as g}from"./theme-Dpxy803y.js";import{Mr as _,Rn as v,cn as y,rt as b}from"./jsx-runtime-dm82oUI8.js";var x=e(t()),S=e(_()),C=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},w=b(e=>{let{prefixCls:t,className:n,closeIcon:s,closable:c,type:l,title:u,children:d,footer:f}=e,p=C(e,[`prefixCls`,`className`,`closeIcon`,`closable`,`type`,`title`,`children`,`footer`]),{getPrefixCls:h}=x.useContext(v),g=h(),_=t||h(`modal`),b=y(g),[w,T,E]=m(_,b),D=`${_}-confirm`,O={};return O=l?{closable:c??!1,title:``,footer:``,children:x.createElement(a,Object.assign({},e,{prefixCls:_,confirmPrefixCls:D,rootPrefixCls:g,content:d}))}:{closable:c??!0,title:u,footer:f!==null&&x.createElement(o,Object.assign({},e)),children:d},w(x.createElement(i,Object.assign({prefixCls:_,className:(0,S.default)(T,`${_}-pure-panel`,l&&D,l&&`${D}-${l}`,n,E,b)},p,{closeIcon:r(_,s),closable:c},O)))});function T(e){return d(c(e))}var E=n;E.useModal=f,E.info=function(e){return d(p(e))},E.success=function(e){return d(g(e))},E.error=function(e){return d(s(e))},E.warning=T,E.warn=T,E.confirm=function(e){return d(l(e))},E.destroyAll=function(){for(;h.length;){let e=h.pop();e&&e()}},E.config=u,E._InternalPanelDoNotUseOrYouWillBeFired=w;export{E as t};