import{j as a,bl as d,av as f}from"./index-f9c70843.js";import{H as u}from"./index-879843fd.js";function h({tags:s,disabled:t=!1,loadingTags:i,selectedTags:n,setSelectedTags:l}){const m=o=>{const e=n.indexOf(o);let r=e===-1?[...n,o]:n.filter((p,c)=>c!==e);l(r)};return a.jsx(u,{isFolder:!1,children:!i&&s.map((o,e)=>a.jsx("button",{disabled:t,className:t?"cursor-not-allowed":" overflow-hidden whitespace-nowrap",onClick:()=>{m(o.name)},"data-testid":`tag-selector-${o.name}`,children:a.jsx(d,{variant:"outline",size:"sq",className:f(n.some(r=>r===o.name)?"min-w-min bg-beta-foreground text-background hover:bg-beta-foreground":""),children:o.name},e)},e))})}export{h as T};
