import{r as e,j as a}from"./vendor-react-AXa6hZO5.js";import{ah as s,ai as t,aj as r}from"./index-C_tZnXTW.js";import{n as l,p as o}from"./cec18ad9a-DiLjrOUd.js";const i=e.forwardRef(({className:e,fixed:s=!1,...t},r)=>a.jsx("table",{ref:r,className:l("text-text-100 whitespace-nowrap w-full",s?"table-fixed":"table-auto",e),...t}));i.displayName="Table";const c=e.forwardRef(({className:e,...s},t)=>a.jsx("thead",{ref:t,className:l("text-left border-b-[0.5px] border-border-300",e),...s}));c.displayName="TableHead";const n=e.forwardRef(({className:e,...s},t)=>a.jsx("tbody",{ref:t,className:l(e),...s}));n.displayName="TableBody";const d=e.forwardRef(({className:e,...t},r)=>a.jsx("tr",{ref:r,className:s("text-text-100 text-sm border-b-[0.5px] border-border-300 transition-colors duration-100 hover:bg-bg-200 group relative h-12",e),...t}));d.displayName="TableRow";const f=e.forwardRef(({className:e,href:t,children:r,...l},o)=>a.jsx("tr",{ref:o,className:s("text-text-100 text-sm border-b-[0.5px] border-border-300 transition-colors duration-100 hover:bg-bg-200 focus-within:bg-bg-200 group relative [transform:translateZ(0)] h-12 cursor-pointer",e),...l,children:a.jsx(x.Provider,{value:t,children:r})}));f.displayName="TableRowLink";const x=e.createContext(null),b=e.forwardRef(({className:e,...s},t)=>a.jsx("th",{ref:t,scope:"col",className:l("py-2 px-3 h-8 text-xs font-semibold text-text-300",e),...s}));b.displayName="TableHeader";const m=e.forwardRef(({className:e,sortDirection:s,onClick:o,children:i,...c},n)=>a.jsx("th",{ref:n,scope:"col","aria-sort":"asc"===s?"ascending":"desc"===s?"descending":"none",className:l("h-8 text-xs font-semibold text-text-300",e),...c,children:a.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 w-full py-2 px-3 cursor-pointer select-none hover:bg-bg-200 text-left",children:[i,"asc"===s&&a.jsx(t,{size:16,className:"text-text-300"}),"desc"===s&&a.jsx(r,{size:16,className:"text-text-300"})]})}));m.displayName="TableHeaderSortable";const p=e.forwardRef(({className:t,interactive:r,isLinkCell:l,linkLabel:i,contained:c,children:n,...d},f)=>{const b=e.useContext(x),m=s("py-3 px-3",c&&"overflow-hidden",t);if(l&&b)return a.jsx("td",{ref:f,className:m,...d,children:a.jsx(o,{href:b,"aria-label":i,className:"hide-focus-ring after:absolute after:inset-0 focus-visible:after:outline focus-visible:after:outline-2 focus-visible:after:-outline-offset-2 focus-visible:after:outline-accent-100",children:n})});const p=r&&b?a.jsx("span",{className:"inline-flex max-w-full relative z-10",children:n}):n;return a.jsx("td",{ref:f,className:m,...d,children:p})});p.displayName="TableCell";export{i as T,c as a,d as b,m as c,b as d,n as e,p as f,f as g};
