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