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