import{a as e,l as t}from"./preact.module-CNakwbc9.js";import{t as n}from"./jsxRuntime.module-Cao1NCKs.js";import{t as r}from"./Dropdown-BUar6udP.js";import{a as i}from"./FormList-CnuOJg6b.js";t();function a({values:t,keyProperty:a,titleProperty:o,titleSuffixProperty:s,descriptionProperty:c,currentValue:l,onChange:u,...d}){let f=t.find(e=>e[a]===l),p=t=>{let r=t[o],i=s?t[s]:null;return i?n(e,{children:[r,` `,n(`small`,{children:i})]}):r};return n(r,{text:f?p(f):``,...d,children:t.map(e=>n(i,{onClick:()=>u(e[a]),checked:l===e[a],description:c&&e[c],selected:l===e[a],children:p(e)}))})}export{a as t};