import{y as e}from"./hooks.module-5xe-uC6c.js";import{t}from"./jsxRuntime.module--xb8gfv5.js";function n({name:e,id:n,onChange:r,style:o,className:s,disabled:c,...l}){return t(i,{name:e,id:n,onChange:r,style:o,className:s,disabled:c,children:t(a,{...l})})}function r({name:n,id:r,values:o,keyProperty:s,titleProperty:c,currentValue:l,onChange:u,disabled:d,...f}){return t(i,{name:n,id:r,onChange:u,disabled:d,...f,children:o.map(n=>n?typeof n==`object`&&`items`in n?t(`optgroup`,{label:n.title,children:t(a,{values:n.items,keyProperty:s,titleProperty:c,currentValue:l})}):t(a,{values:[n],keyProperty:s,titleProperty:c,currentValue:l}):t(e,{}))})}function i({id:e,name:n,children:r,onChange:i,style:a,className:o,disabled:s}){return t(`select`,{id:e,name:n,onChange:e=>i(e.target.value),style:a,className:`form-select ${o??``}`,disabled:s,children:r})}function a({values:e,keyProperty:n,titleProperty:r,currentValue:i}){return e.map(e=>t(`option`,{value:e[n],selected:e[n]===i,children:e[r??n]??e[n]}))}export{r as n,n as t};