import{a as N,aB as e,r as O,aC as R,aD as S,aE as v,b as A,f as T,k as s,aF as d,j as r,B as h,c as k}from"./index.0d073eaa.js";import{R as G}from"./index.3fd6d808.js";var C="/app/admin/assets/no-data.f7e550cc.svg",D="/app/admin/assets/net-error.61b7e6df.svg",I=N({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(a){const n=O(new Map),{query:m}=R(),o=S(),c=v(),{t}=k(),{prefixCls:f}=A("app-exception-page"),_=T(()=>{const{status:l}=m,{status:u}=a;return Number(l)||u}),g=T(()=>s(n).get(s(_))),p=t("sys.exception.backLogin"),i=t("sys.exception.backHome");return s(n).set(e.PAGE_NOT_ACCESS,{title:"403",status:`${e.PAGE_NOT_ACCESS}`,subTitle:t("sys.exception.subTitle403"),btnText:a.full?p:i,handler:()=>a.full?o(d.BASE_LOGIN):o()}),s(n).set(e.PAGE_NOT_FOUND,{title:"404",status:`${e.PAGE_NOT_FOUND}`,subTitle:t("sys.exception.subTitle404"),btnText:a.full?p:i,handler:()=>a.full?o(d.BASE_LOGIN):o()}),s(n).set(e.ERROR,{title:"500",status:`${e.ERROR}`,subTitle:t("sys.exception.subTitle500"),btnText:i,handler:()=>o()}),s(n).set(e.PAGE_NOT_DATA,{title:t("sys.exception.noDataTitle"),subTitle:"",btnText:t("common.redo"),handler:()=>c(),icon:C}),s(n).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:u,btnText:b,icon:x,handler:E,status:y}=s(g)||{};return r(G,{class:f,status:y,title:a.title||l,"sub-title":a.subTitle||u},{extra:()=>b&&r(h,{type:"primary",onClick:E},{default:()=>b}),icon:()=>x?r("img",{src:x},null):null})}}});export{I as default};
