1import{u as h,s as f,a as j,r as g,j as e,S as C,b as y,d as N}from"./index-C00YXtdW.js";import{P as b}from"./PaginatedTable-OU-WmyJk.js";import{g as v,B as n}from"./subscriptionDisplay-1xpGVhrK.js";import{C as w,a as P,b as S}from"./index-D4CetdtG.js";import{u as U,a as k,b as E}from"./organisation-CE95Ud8P.js";import{S as K}from"./token-BUpNfDEx.js";import{C as O}from"./circle-check-big-D1LZ_ke8.js";import{C as R}from"./toolTipText-B6McCBkL.js";import{E as V}from"./external-link-B7lvEcS2.js";import"./index-BzxNksKy.js";import"./pagination-B3z2sGcf.js";import"./icon-CTHVUv61.js";import"./useLocation-BD6tjkd3.js";import"./useDateMode-BrJ7imOU.js";import"./select-BEgzG3h1.js";import"./index-SnuytDdP.js";import"./index-BvYIwy9c.js";import"./action-type-ivGSfB-Q.js";import"./rhea-DdOvxqHk.js";import"./table-Np-B6xGr.js";const B=({setViewOrg:r})=>{const c=h(f),{isAuthenticated:o}=v(c,0),l=j(),{data:t}=U(),{data:i}=k(),[m]=E(),d=[{accessorKey:"name",header:"Name"},{accessorKey:"organisation",header:"Addresses",cell:({row:s})=>s.getValue("organisation").length},{accessorKey:"stars",header:"",cell:({row:s})=>{const a=s.getValue("stars");return e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-2",children:a}),e.jsx(K,{className:"h-4 w-4 text-yellow-500"})]})}},{accessorKey:"public",header:"Public",cell:({row:s})=>s.getValue("public")?e.jsx(O,{className:"h-5 w-5 text-green-500"}):null},{accessorKey:"id",header:"",cell:({row:s})=>{const a=Number(s.getValue("id")),p=i==null?void 0:i.find(x=>x.organisation_id===a);return e.jsx(n,{variant:"ghost",size:"icon",onClick:()=>{o?m({id:a}):l(y({isModalOpen:!0,modalComponent:"signin"}))},children:e.jsx(R,{className:`h-5 w-5 transform ${o&&p?"text-yellow-500 fill-current":"text-primary"}`})})}},{id:"actions",cell:({row:s})=>e.jsxs(n,{variant:"outline",size:"sm",onClick:()=>r(Number(s.original.id)),className:"flex items-center space-x-2",children:[e.jsx("span",{children:"View"}),e.jsx(V,{className:"h-4 w-4"})]})}];g.useEffect(()=>{r(null)},[r]);const u=(t==null?void 0:t.map(s=>({...s,id:s.id.toString()})))||[];return e.jsx("div",{className:"w-full",children:e.jsxs(w,{children:[e.jsx(P,{children:e.jsx("h2",{className:"text-2xl font-semibold",children:"Organisations"})}),e.jsx(S,{children:t!=null&&t.length?e.jsx(b,{columns:d,data:u,maxHeight:500}):e.jsx("div",{className:"flex justify-center py-8",children:e.jsx(C,{className:"h-[500px] w-full"})})})]})})};function se(){const{setViewOrg:r}=N();return e.jsx(B,{setViewOrg:r})}export{se as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.