import{x as i,j as e,w as n,D as c,f as l,B as g,g as m,h as a,ab as h}from"./index-Cc987VYg.js";import{C as x}from"./chevrons-up-down-ksijt0Wf.js";import{E as p}from"./eye-off-DI70rQvm.js";const j=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],o=i("arrow-down",j);const w=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],d=i("arrow-up",w);function N({column:s,title:r,className:t}){return s.getCanSort()?e.jsx("div",{className:n("flex items-center gap-2",t),children:e.jsxs(c,{children:[e.jsx(l,{asChild:!0,children:e.jsxs(g,{variant:"ghost",size:"sm",className:"-ml-3 h-9 data-[state=open]:bg-accent hover:bg-muted/50","aria-label":s.getIsSorted()==="desc"?"Sorted descending. Click to sort ascending.":s.getIsSorted()==="asc"?"Sorted ascending. Click to sort descending.":"Not sorted. Click to sort ascending.",children:[e.jsx("span",{className:"font-semibold",children:r}),s.getIsSorted()==="desc"?e.jsx(o,{className:"ml-2 h-4 w-4 text-primary-900","aria-hidden":"true"}):s.getIsSorted()==="asc"?e.jsx(d,{className:"ml-2 h-4 w-4 text-primary-900","aria-hidden":"true"}):e.jsx(x,{className:"ml-2 h-4 w-4 text-primary-200","aria-hidden":"true"})]})}),e.jsxs(m,{align:"start",children:[e.jsxs(a,{"aria-label":"Sort ascending",onClick:()=>s.toggleSorting(!1),children:[e.jsx(d,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Asc"]}),e.jsxs(a,{"aria-label":"Sort descending",onClick:()=>s.toggleSorting(!0),children:[e.jsx(o,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Desc"]}),s.getCanHide()&&e.jsxs(e.Fragment,{children:[e.jsx(h,{}),e.jsxs(a,{"aria-label":"Hide column",onClick:()=>s.toggleVisibility(!1),children:[e.jsx(p,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70"}),"Hide"]})]})]})]})}):e.jsx("div",{className:n("font-semibold",t),children:r})}export{o as A,N as D,d as a};
