import{c as d,j as e,B as o,a as f}from"./main-pzSpmpV2.js";import{B as i}from"./badge-DNC7XzqG.js";import{C as j,a as p,b as v,c as y,d as h,e as x,f as C}from"./command-CpAAY9qL.js";import{P as g,a as u,b as k}from"./popover-CdzFhe13.js";import{S as N}from"./separator-C1IUkfHl.js";import{C as b}from"./FetchWrapper-DtDh1OOQ.js";/**
 * @license lucide-react v0.302.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const B=d("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
 * @license lucide-react v0.302.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const A=d("CircleOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.35 2.69A10 10 0 0 1 21.3 15.65",key:"1pfsoa"}],["path",{d:"M19.08 19.08A10 10 0 1 1 4.92 4.92",key:"1ablyi"}]]);/**
 * @license lucide-react v0.302.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const w=d("PlusCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);function I({column:s,title:l,options:n}){const t=s==null?void 0:s.getFacetedUniqueValues(),r=new Set(s==null?void 0:s.getFilterValue());return e.jsxs(g,{children:[e.jsx(u,{asChild:!0,children:e.jsxs(o,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(w,{}),l,(r==null?void 0:r.size)>0&&e.jsxs(e.Fragment,{children:[e.jsx(N,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(i,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(i,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):n.filter(a=>r.has(a.value)).map(a=>e.jsx(i,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:a.label},a.value))})]})]})}),e.jsx(k,{className:"w-[200px] p-0",align:"start",children:e.jsxs(j,{children:[e.jsx(p,{placeholder:l}),e.jsxs(v,{children:[e.jsx(y,{children:"No results found."}),e.jsx(h,{children:n.map(a=>{const c=r.has(a.value);return e.jsxs(x,{onSelect:()=>{c?r.delete(a.value):r.add(a.value);const m=Array.from(r);s==null||s.setFilterValue(m.length?m:void 0)},children:[e.jsx("div",{className:f("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(b,{})}),a.icon&&e.jsx(a.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:a.label}),(t==null?void 0:t.get(a.value))&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:t.get(a.value)})]},a.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx(h,{children:e.jsx(x,{onSelect:()=>s==null?void 0:s.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}export{B as C,I as D,A as a};
//# sourceMappingURL=data-table-faceted-filter-kNYtu19G.js.map
