import{BaseColors as o}from"../../lib/constants.js";import{colorClassNames as r}from"../../lib/colorClassNames.js";import{colorPalette as t,DEFAULT_COLOR as e,WHITE as l}from"../../lib/theme.js";import{getColorClassNames as n}from"../../lib/utils.js";import i from"react";import{twMerge as s}from"tailwind-merge";function a(o){const r=new Map;return i.Children.map(o,(o=>{var t;r.set(o.props.value,null!==(t=o.props.text)&&void 0!==t?t:o.props.value)})),r}function m(o,r){return""===o?r:r.filter((r=>{var t;return(null!==(t=r.text)&&void 0!==t?t:r.value).toLowerCase().includes(o.toLowerCase())}))}const u=(i,a,m=!1)=>s(a?n(e,t.canvasBackground).bgColor:n(l,t.background).bgColor,!a&&n(e,t.canvasBackground).hoverBgColor,i?n(e,t.darkText).textColor:n(e,t.text).textColor,a&&n(e,t.lightText).textColor,m&&r[o.Rose][t.text].textColor,m?r[o.Rose][t.ring].borderColor:n(e,t.ring).borderColor),p=o=>null!=o&&""!==o;export{a as constructValueToNameMapping,m as getFilteredOptions,u as getSelectButtonColors,p as hasValue};
