import{n as e}from"./useStore-CusP06SD.js";import{a as t}from"./dist-DhH_lYkz.js";import{a as n,i as r,n as i,r as a,t as o}from"./select-CZn10WME.js";import{i as s}from"./index-DinSQfHc.js";import{r as c}from"./form-context-B-ekdUc0.js";import{n as l,t as u}from"./required-indicator-BXf2UzTH.js";import{t as d}from"./FieldInfo-FLjtPgL4.js";var f=e();function p({className:e,label:p,options:m}){let h=c(),{isFieldRequired:g}=l();return(0,f.jsxs)(`div`,{className:t(`space-y-3`,e),children:[(0,f.jsxs)(s,{htmlFor:h.name,className:`block w-full`,children:[p,g(h.name)&&(0,f.jsx)(u,{})]}),(0,f.jsxs)(o,{name:h.name,defaultValue:h.state.value,onValueChange:e=>h.handleChange(e),children:[(0,f.jsx)(r,{className:`w-full shadow-none`,children:(0,f.jsx)(n,{placeholder:`Select a link type`})}),(0,f.jsx)(i,{children:Object.values(m).map(e=>(0,f.jsx)(a,{value:e.toLowerCase(),className:`hover:bg-accent/50`,children:e.toLowerCase()},e.toLowerCase()))})]},`${h.name}-${h.state.value}`),(0,f.jsx)(d,{fieldMeta:h.state.meta})]})}export{p as default};