import{j as o}from"./jsx-runtime.D_zvdyIk.js";import{r as m}from"./index.2yJIXLcc.js";import{s as n}from"./textConverter.D1LjrjZ_.js";const w=({tags:c})=>{const[a,d]=m.useState(new URLSearchParams(window.location.search)),s=a.get("t"),i=e=>{const t=e.toString(),r=t?`/products?${t}`:"/products";window.location.href=r.toString(),d(e)},l=e=>{const t=n(e.toLowerCase()),r=new URLSearchParams(a.toString());t===s?r.delete("t"):r.set("t",t),i(r)};return o.jsx("button",{className:"flex flex-wrap gap-3",children:c.map(e=>o.jsx("p",{className:`px-2 py-1 rounded-md border border-border dark:border-light text-light dark:text-darkmode-light ${s===n(e.toLowerCase())&&"bg-theme-light dark:bg-theme-dark"}`,onClick:()=>l(e),children:e},e))})};export{w as default};
