1import{e as n,j as e,L as w}from"./app-D5Bf_dbH.js";import{u as b,f as x,c as g}from"./index-DUmWsBsk.js";import{T as p,a as j,b as c,c as y,d as N,e as u}from"./table-Dn41ev5Z.js";import{C}from"./card-CUwjT2hB.js";import{B as v}from"./button-BooRjUAf.js";import"./index-eCYNzz1C.js";function L({columns:i,data:f,pagination:d}){const[r,h]=n.useState(!1);n.useEffect(()=>{const s=()=>{h(window.innerWidth<768)};return s(),window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]);const m=n.useMemo(()=>r?i.filter(s=>{const t="accessorKey"in s?String(s.accessorKey):"";return t?["EmailAddress"].includes(t):s.id==="actions"}):i,[i,r]),o=b({data:f,columns:m,getCoreRowModel:g()});return e.jsx("div",{className:"w-full max-w-full",children:e.jsxs(C,{className:"w-full",children:[e.jsx("div",{className:"w-full overflow-x-auto px-3",style:{maxWidth:"100vw"},children:e.jsxs(p,{className:"w-full table-fixed",children:[e.jsx(j,{children:o.getHeaderGroups().map(s=>e.jsx(c,{children:s.headers.map(t=>{const a=t.id;let l="";return a==="EmailAddress"?l=r?"w-3/4":"w-1/2":a==="CreateDate"?l="w-1/3":a==="actions"&&(l=r?"w-1/4":"w-16"),e.jsx(y,{className:`text-[13px] text-gray-500 font-normal h-14 border-b border-gray-200 ${l}`,children:t.isPlaceholder?null:x(t.column.columnDef.header,t.getContext())},t.id)})},s.id))}),e.jsx(N,{children:o.getRowModel().rows?.length?o.getRowModel().rows.map(s=>e.jsx(c,{"data-state":s.getIsSelected()&&"selected",className:"border-b border-gray-200 hover:bg-gray-50/50",children:s.getVisibleCells().map(t=>{const a=t.column.id;let l="";return a==="EmailAddress"?l=r?"w-3/4":"w-1/2":a==="CreateDate"?l="w-1/3":a==="actions"&&(l=r?"w-1/4":"w-16"),e.jsx(u,{className:`h-[72px] py-4 ${l}`,children:x(t.column.columnDef.cell,t.getContext())},t.id)})},s.id)):e.jsx(c,{children:e.jsx(u,{colSpan:m.length,className:"py-16",children:e.jsxs("div",{className:"flex flex-col items-center justify-center text-center",children:[e.jsx("img",{src:"/images/svg/magnifying-glass.svg",alt:"No results",className:"w-24 h-24 mb-4"}),e.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"No results found."}),e.jsx("p",{className:"text-sm text-gray-500 mb-4",children:"Your tracking code might not be included on your website."}),e.jsx(v,{className:"",asChild:!0,children:e.jsx(w,{href:route("auth.setup.index"),children:"Get Activated"})})]})})})})]})}),d&&e.jsx("div",{className:"border-t border-gray-200 py-4 px-3",children:d})]})})}export{L as ContactsDataTable};
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.