import{l as i,w as d,n as g,p as t}from"./index-Db-xuq0b.js";const u=async()=>i.get("/organization-types",{headers:d()}),e=[{id:"1",name:{en:"Government",am:"መንግስታዊ"},key:"government",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},{id:"2",name:{en:"Private",am:"የግል"},key:"private",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},{id:"3",name:{en:"Non-Governmental",am:"መንግስታዊ ያልሆነ"},key:"ngo",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}],m=()=>{const{data:n,isLoading:a,isError:r,refetch:o}=g({queryKey:["organizationTypes"],queryFn:async()=>{try{const s=t.get("tenant-key")||"default-tenant-key",y=t.get("unit-id");return(await u()).data}catch{return{count:e.length,items:e}}},staleTime:3e5,enabled:!0});return{organizationTypesResponse:n||{count:e.length,items:e},isLoading:a,isError:r,refetch:o}};export{m as u};
