import{M as g,i as w,n as B}from"./app-JmgyQoR0.js";import{b,a,w as M,D as p,h as r,i as S,j as h,t as c,l as f,B as $,u as l,K as _,E as m,T as C,I,J as F}from"./vue-y3KLWBaS.js";const N=b({components:{MkButton:g},props:{p:{type:Function,required:!0}},setup(e,k){const t=a(!0),s=a(!1),o=a(!1),i=a(null),n=()=>{if(e.p==null)return;const u=e.p();t.value=!0,s.value=!1,o.value=!1,u.then(y=>{t.value=!1,s.value=!0,i.value=y}),u.catch(()=>{t.value=!1,o.value=!0})};return M(()=>e.p,()=>{n()},{immediate:!0}),{pending:t,resolved:s,rejected:o,result:i,retry:()=>{n()},i18n:w}}}),v=e=>(I("data-v-f2e69c0b"),e=e(),F(),e),T={key:0},V={key:1},j={key:2},z={class:"wszdbhzo"},D=v(()=>l("i",{class:"ph-warning ph-bold ph-lg"},null,-1)),E=v(()=>l("i",{class:"ph-arrow-clockwise ph-bold ph-lg"},null,-1));function L(e,k,t,s,o,i){const n=p("MkLoading"),d=p("MkButton");return r(),S(C,{name:e.$store.state.animation?"fade":"",mode:"out-in"},{default:h(()=>[e.pending?(r(),c("div",T,[f(n)])):e.resolved?(r(),c("div",V,[$(e.$slots,"default",{result:e.result},void 0,!0)])):(r(),c("div",j,[l("div",z,[l("div",null,[D,_(" "+m(e.i18n.ts.somethingHappened),1)]),f(d,{inline:"",class:"retry",onClick:e.retry},{default:h(()=>[E,_(" "+m(e.i18n.ts.retry),1)]),_:1},8,["onClick"])])]))]),_:3},8,["name"])}const J=B(N,[["render",L],["__scopeId","data-v-f2e69c0b"]]);export{J as F};
