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