import{o as e}from"./utils-Dac180Gn.js";import{t}from"./createLucideIcon-CJ2NGl7n.js";import{a as n,i as r,n as i,r as a,t as o}from"./select-788h6o8Z.js";import{Ki as s,ca as c,da as l,fa as u,ga as d,la as f,pa as p,ua as m}from"./index-8M5AnKdQ.js";import{t as h}from"./searchable-select-DMJZdxj4.js";var g=t(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),_=e(),v=7;function y({label:e,value:t,onChange:c,options:l=[],placeholder:u=`All`,searchable:d,customInput:f}){let p=d??l.length>v;return(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(s,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider`,children:e}),f||(p?(0,_.jsx)(h,{value:t,onValueChange:c,options:[{value:`all`,label:u},...l],placeholder:u}):(0,_.jsxs)(o,{value:t,onValueChange:c,children:[(0,_.jsx)(r,{className:`w-full h-10`,children:(0,_.jsx)(n,{placeholder:u})}),(0,_.jsxs)(i,{children:[(0,_.jsx)(a,{value:`all`,children:u}),l.map(e=>(0,_.jsx)(a,{value:e.value,children:e.label},e.value))]})]}))]})}function b({open:e,onOpenChange:t,onClear:n,children:r}){return(0,_.jsx)(c,{open:e,onOpenChange:t,children:(0,_.jsxs)(f,{className:`flex flex-col w-[340px] p-0`,showCloseButton:!1,children:[(0,_.jsx)(u,{className:`px-6 pt-6 pb-4 border-b border-border/60`,children:(0,_.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,_.jsx)(`div`,{className:`flex items-center justify-center size-9 rounded-lg bg-primary/10`,children:(0,_.jsx)(g,{className:`size-4 text-primary`})}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(p,{className:`text-base font-semibold`,children:`Filters`}),(0,_.jsx)(m,{className:`text-xs text-muted-foreground`,children:`Narrow down your results`})]})]})}),(0,_.jsx)(`div`,{className:`flex-1 min-h-0 px-6 py-5 space-y-5 overflow-y-auto`,children:r}),(0,_.jsxs)(l,{className:`px-6 py-4 border-t border-border/60 bg-muted/30 flex-row gap-3 sm:justify-between`,children:[(0,_.jsx)(d,{variant:`outline`,size:`sm`,onClick:n,className:`text-muted-foreground hover:text-foreground`,children:`Clear all`}),(0,_.jsx)(d,{size:`sm`,onClick:()=>t(!1),children:`Apply Filters`})]})]})})}export{b as n,y as t};