"use strict";const r=require("react/jsx-runtime"),o=require("react"),p=require("./bind-DeUYJ6m9.js"),g=require("./checkmark.es-lYntWFA3.js"),N=require("./paragraph-BsI53OR0.js"),m={"purpur-listbox":"_purpur-listbox_6c8yl_1","purpur-listbox-item":"_purpur-listbox-item_6c8yl_15","purpur-listbox-item--hovered":"_purpur-listbox-item--hovered_6c8yl_29","purpur-listbox-item--highlighted":"_purpur-listbox-item--highlighted_6c8yl_37","purpur-listbox-item--noninteractive":"_purpur-listbox-item--noninteractive_6c8yl_41","purpur-listbox-item--disabled":"_purpur-listbox-item--disabled_6c8yl_44","purpur-listbox-item__icon":"_purpur-listbox-item__icon_6c8yl_51"},u=p.c.bind(m),e="purpur-listbox",a=o.forwardRef((i,t)=>{const{disabled:s,highlighted:d,hovered:x,selected:l,children:c,className:b,noninteractive:_,...h}=i,y=u(`${e}-item`,b,{[`${e}-item--highlighted`]:d,[`${e}-item--selected`]:l,[`${e}-item--hovered`]:x,[`${e}-item--disabled`]:s,[`${e}-item--noninteractive`]:_});return r.jsxs("li",{...h,ref:t,className:y,"aria-selected":!!l,role:"option","aria-disabled":!!s,children:[typeof c=="string"?r.jsx(N.Paragraph,{children:c}):c,l&&r.jsx(g.a,{size:"xs",className:u(`${e}-item__icon`)})]})}),$=i=>o.isValidElement(i)&&i?.type===a;a.displayName="ListBoxItem";const v=p.c.bind(m),f="purpur-listbox",n=o.forwardRef(({children:i,...t},s)=>r.jsx("ul",{...t,ref:s,className:v(f,t.className),role:"listbox",children:o.Children.toArray(i).filter($)}));n.Item=a;n.displayName="ListBox";exports.Listbox=n;
//# sourceMappingURL=listbox-BmjBtIv8.js.map
