1import u from"./ch-BaseDropdown-DtkgocjI.js";import{_ as c,o,c as s,k as m,e as p,F as h,a as y,t as v,r as _}from"./app-index-CXQob2hh.js";const V={name:"SelectField",components:{BaseDropdown:u},emits:["update:modelValue","change","validity"],props:{id:{type:String,required:!0},name:{type:String,required:!0},modelValue:{type:String,required:!1,default:""},options:{type:Array,required:!1,default:()=>[]}},methods:{emitValidity(t){const e=t??"";if(!e){this.$emit("validity",{name:this.name,isValid:!0,source:"select"});return}const i=(this.options||[]).some(l=>l?.key===e);this.$emit("validity",{name:this.name,isValid:i,source:"select"})},emitValue(t){const e=t??"";this.$emit("update:modelValue",e),this.$emit("change",e),this.emitValidity(e)},optionClick(t){const e=t?._item?.key??"";this.emitValue(e)},onNativeChange(t){this.emitValue(t?.target?.value)}}},f=["id","value"],g=["value"];function k(t,e,i,l,C,a){const r=_("BaseDropdown");return o(),s("div",null,[m(r,{options:i.options,id:i.id,onOptionClick:a.optionClick}
1,null,8,["options","id","onOptionClick"]),p("select",{id:i.id,style:{display:"none"},value:i.modelValue,onChange:e[0]||(e[0]=(...n)=>a.onNativeChange&&a.onNativeChange(...n))},[(o(!0),s(h,null,y(i.options,(n,d)=>(o(),s("option",{key:d,value:n.key},v(n.label),9,g))),128))],40,f)])}const x=c(V,[["render",k]]);export{x as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.