import{c as r,o as s,f as a,g as n,t as i,I as c,b as u,q as m,p as f,n as h}from"./app-BLo7SiiE.js";import{_}from"./FlashMessages-DImpr6PL.js";import{v as p}from"./v4-SoommWqA.js";const S={inheritAttrs:!1,props:{id:{type:String,default(){return`select-input-${p()}`}},error:String,label:String,required:{type:Boolean,default(){return!1}},modelValue:[String,Number,Boolean]},emits:["update:modelValue"],data(){return{selected:this.modelValue}},watch:{selected(t){this.$emit("update:modelValue",t)}},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()}}},b=["for"],g=["id","required"],V={key:1,class:"form-error"};function v(t,l,e,q,o,y){return s(),r("div",{class:h(t.$attrs.class)},[e.label?(s(),r("label",{key:0,class:"form-label",for:e.id},i(e.label),9,b)):a("",!0),n(u("select",f({id:e.id,ref:"input","onUpdate:modelValue":l[0]||(l[0]=d=>o.selected=d)},{...t.$attrs,class:null},{class:["form-select",{error:e.error}],required:e.required}),[m(t.$slots,"default")],16,g),[[c,o.selected]]),e.error?(s(),r("div",V,i(e.error),1)):a("",!0)],2)}const w=_(S,[["render",v]]);export{w as S};
