import{_ as z}from"./Ba76BwjT.js";import{e as x,x as h,K as y,j as k,c as l,f as t,a as s,b as d,t as w,w as N,H as B,h as C,L as I,i as u,G as V,E as b,o as i,d as E,_ as L}from"./DpdQcRr7.js";import{u as O}from"./DuJ0NDcC.js";import"./BcpEzrWT.js";import"./D1zzHZdQ.js";const R={key:0,class:"organization-loading has-text-centered py-6"},j={class:"icon is-large"},q={key:1,class:"organization-error"},A={class:"notification is-warning"},D=x({__name:"[id]",setup(G){const m=h(),_=V(()=>m.params.id),r=u(!0),a=u(null),n=u(null),c=async()=>{r.value=!0,n.value=null;try{const o=await O(`/api/admin/organizations/${_.value}`);o!=null&&o.organization?a.value=o.organization:(n.value="組織が見つかりませんでした",a.value=null)}catch(o){console.error("組織の取得に失敗しました:",o),n.value="組織の取得に失敗しました",a.value=null}finally{r.value=!1}},p=()=>{c()};return y(_,()=>{c()}),k(async()=>{await c()}),(o,e)=>{const f=b("Icon"),g=z,v=I;return i(),l("div",null,[t(r)?(i(),l("div",R,[s("span",j,[d(f,{icon:"mdi:loading",class:"mdi-spin"})]),e[0]||(e[0]=s("p",null,"読み込み中...",-1))])):t(n)?(i(),l("div",q,[s("div",A,[s("p",null,w(t(n)),1),d(g,{to:"/admin/organizations",class:"button is-small mt-3"},{default:N(()=>[...e[1]||(e[1]=[E(" 一覧に戻る ",-1)])]),_:1})])])):t(a)?(i(),B(v,{key:2,organization:t(a),"refetch-organization":p},null,8,["organization"])):C("",!0)])}}}),T=L(D,[["__scopeId","data-v-f7f1aac9"]]);export{T as default};
