import{e as h,x as y,j as k,B as w,K as g,c as l,f as a,a as t,b as _,t as j,H as x,h as B,i,G as b,E as C,o as n,an as I,L as N,_ as P}from"./DpdQcRr7.js";import{u as S}from"./DnDgEkgi.js";import{P as V}from"./MNmNWAT4.js";import{u as $}from"./DuJ0NDcC.js";import"./BcpEzrWT.js";import"./D1zzHZdQ.js";const E={class:"sp-detail-page"},F={key:0,class:"sp-center"},L={key:1,class:"sp-center"},R=h({__name:"[id]",setup(q){const u=S(),f=y(),p=b(()=>f.params.id),r=i(null),c=i(!1),o=i(null),d=async()=>{var s;c.value=!0,o.value=null;try{const e=await $(`/api/user/shared-projects/${p.value}`);r.value=new V(e)}catch(e){o.value=((s=e.data)==null?void 0:s.detail)||e.message||"プロジェクトの取得に失敗しました"}finally{c.value=!1}};return k(()=>{u.showFooter=!1,d()}),w(()=>{u.showFooter=!0}),g(p,()=>{d()}),I("project",r),(s,e)=>{const m=C("Icon"),v=N;return n(),l("div",E,[a(c)?(n(),l("div",F,[...e[1]||(e[1]=[t("div",{class:"sp-spinner"},null,-1),t("p",null,"読み込み中...",-1)])])):a(o)?(n(),l("div",L,[_(m,{icon:"mdi:alert-circle-outline",width:64,height:64,class:"sp-error-icon"}),t("p",null,j(a(o)),1),t("button",{class:"button is-primary",onClick:e[0]||(e[0]=A=>s.$router.back())},[_(m,{icon:"mdi:arrow-left",width:16,height:16}),e[2]||(e[2]=t("span",null,"戻る",-1))])])):a(r)?(n(),x(v,{key:2})):B("",!0)])}}}),z=P(R,[["__scopeId","data-v-a685e788"]]);export{z as default};
