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