import{E as e,k as R,n as N,o as O,u as S,q as m}from"./index.js";import{d as A,f as k,aj as G,c as _,u as s,k as r}from"./vue-08ef39cb.js";import{B as h,R as P}from"./antd-fb8ca017.js";const C=""+new URL("no-data-f7e550cc.svg",import.meta.url).href,D=""+new URL("net-error-61b7e6df.svg",import.meta.url).href,B=A({name:"ErrorPage",props:{status:{type:Number,default:e.PAGE_NOT_FOUND},title:{type:String,default:""},subTitle:{type:String,default:""},full:{type:Boolean,default:!1}},setup(n){const o=k(new Map),{query:p}=G(),a=R(),c=N(),{t}=O(),{prefixCls:d}=S("app-exception-page"),E=_(()=>{const{status:l}=p,{status:i}=n;return Number(l)||i}),x=_(()=>s(o).get(s(E))),T=t("sys.exception.backLogin"),u=t("sys.exception.backHome");return s(o).set(e.PAGE_NOT_ACCESS,{title:"403",status:`${e.PAGE_NOT_ACCESS}`,subTitle:t("sys.exception.subTitle403"),btnText:n.full?T:u,handler:()=>n.full?a(m.BASE_LOGIN):a()}),s(o).set(e.PAGE_NOT_FOUND,{title:"404",status:`${e.PAGE_NOT_FOUND}`,subTitle:t("sys.exception.subTitle404"),btnText:n.full?T:u,handler:()=>n.full?a(m.BASE_LOGIN):a()}),s(o).set(e.ERROR,{title:"500",status:`${e.ERROR}`,subTitle:t("sys.exception.subTitle500"),btnText:u,handler:()=>a()}),s(o).set(e.PAGE_NOT_DATA,{title:t("sys.exception.noDataTitle"),subTitle:"",btnText:t("common.redo"),handler:()=>c(),icon:C}),s(o).set(e.NET_WORK_ERROR,{title:t("sys.exception.networkErrorTitle"),subTitle:t("sys.exception.networkErrorSubTitle"),btnText:t("common.redo"),handler:()=>c(),icon:D}),()=>{const{title:l,subTitle:i,btnText:b,icon:f,handler:g,status:y}=s(x)||{};return r(P,{class:d,status:y,title:n.title||l,"sub-title":n.subTitle||i},{extra:()=>b&&r(h,{type:"primary",onClick:g},{default:()=>b}),icon:()=>f?r("img",{src:f},null):null})}}});export{B as default};
