const e=require("../_util/classNames.js"),t=require("../config-provider/hooks/useConfigInject.js"),n=require("../_util/vue-types/index.js"),r=require("./noFound.js"),i=require("./serverError.js"),a=require("./style/index.js"),o=require("./unauthorized.js");let s=require("vue"),c=require("@antsoo-lib/icons");var l={success:c.CheckCircleFilled,error:c.CloseCircleFilled,info:c.ExclamationCircleFilled,warning:c.WarningFilled},u={404:r.default,500:i.default,403:o.default},d=Object.keys(u),f=()=>({prefixCls:String,icon:n.default.any,status:{type:[Number,String],default:`info`},title:n.default.any,subTitle:n.default.any,extra:n.default.any}),p=(e,{status:t,icon:n})=>{if(d.includes(`${t}`)){let n=u[t];return(0,s.createVNode)(`div`,{class:`${e}-icon ${e}-image`},[(0,s.createVNode)(n,null,null)])}let r=l[t],i=n||(0,s.createVNode)(r,null,null);return(0,s.createVNode)(`div`,{class:`${e}-icon`},[i])},m=(e,t)=>t&&(0,s.createVNode)(`div`,{class:`${e}-extra`},[t]),h=(0,s.defineComponent)({compatConfig:{MODE:3},name:`AResult`,inheritAttrs:!1,props:f(),slots:Object,setup(n,{slots:r,attrs:i}){let{prefixCls:o,direction:c}=t.default(`result`,n),[l,u]=a.default(o),d=(0,s.computed)(()=>e.default(o.value,u.value,`${o.value}-${n.status}`,{[`${o.value}-rtl`]:c.value===`rtl`}));return()=>{let e=n.title??r.title?.(),t=n.subTitle??r.subTitle?.(),a=n.icon??r.icon?.(),c=n.extra??r.extra?.(),u=o.value;return l((0,s.createVNode)(`div`,{...i,class:[d.value,i.class]},[p(u,{status:n.status,icon:a}),(0,s.createVNode)(`div`,{class:`${u}-title`},[e]),t&&(0,s.createVNode)(`div`,{class:`${u}-subtitle`},[t]),m(u,c),r.default&&(0,s.createVNode)(`div`,{class:`${u}-content`},[r.default()])]))}}});h.PRESENTED_IMAGE_403=u[403],h.PRESENTED_IMAGE_404=u[404],h.PRESENTED_IMAGE_500=u[500],h.install=function(e){return e.component(h.name,h),e},exports.ExceptionMap=u,exports.IconMap=l,exports.default=h,exports.resultProps=f;