import{s as e}from"./utils-CXcsdpX-.js";import{t}from"./createLucideIcon-Dyxun56z.js";import{a as n,i as r,n as i,r as a,t as o}from"./select-B6Gfe6WE.js";import{Fa as s,Ia as c,Ma as l,Na as u,Pa as d,aa as f,ja as p,za as m}from"./index-Ct5uU080.js";import{t as h}from"./searchable-select-DBqECFkR.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:s,options:c=[],placeholder:l=`All`,searchable:u,customInput:d}){let p=u??c.length>v;return(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(f,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider`,children:e}),d||(p?(0,_.jsx)(h,{value:t,onValueChange:s,options:[{value:`all`,label:l},...c],placeholder:l}):(0,_.jsxs)(o,{value:t,onValueChange:s,children:[(0,_.jsx)(r,{className:`w-full h-10`,children:(0,_.jsx)(n,{placeholder:l})}),(0,_.jsxs)(i,{children:[(0,_.jsx)(a,{value:`all`,children:l}),c.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)(p,{open:e,onOpenChange:t,children:(0,_.jsxs)(l,{className:`flex flex-col w-[340px] p-0`,showCloseButton:!1,children:[(0,_.jsx)(s,{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)(c,{className:`text-base font-semibold`,children:`Filters`}),(0,_.jsx)(u,{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)(d,{className:`px-6 py-4 border-t border-border/60 bg-muted/30 flex-row gap-3 sm:justify-between`,children:[(0,_.jsx)(m,{variant:`outline`,size:`sm`,onClick:n,className:`text-muted-foreground hover:text-foreground`,children:`Clear all`}),(0,_.jsx)(m,{size:`sm`,onClick:()=>t(!1),children:`Apply Filters`})]})]})})}export{b as n,y as t};