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