import{E as e,o as R,t as N,v as O,u as S,x as m}from"./index.js";import{d as A,f as k,ai as G,c as _,u as s,k as r}from"./vue-72a104e4.js";import{B as h,X as P}from"./antd-0679333d.js";const v=""+new URL("no-data-f7e550cc.svg",import.meta.url).href,C=""+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"),x=_(()=>{const{status:l}=p,{status:i}=n;return Number(l)||i}),E=_(()=>s(o).get(s(x))),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:v}),s(o).set(e.NET_WORK_ERROR,{title:t("sys.exception.networkErrorTitle"),subTitle:t("sys.exception.networkErrorSubTitle"),btnText:t("common.redo"),handler:()=>c(),icon:C}),()=>{const{title:l,subTitle:i,btnText:b,icon:f,handler:g,status:y}=s(E)||{};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};
