import{r as t,c as e,h as s,H as i,a as o}from"./p-d55626d1.js";const r=class{constructor(s){t(this,s),this.formEvent=e(this,"formEvent",7),this.multiple=!1,this.extraProps={}}onChange(t){this.inputValue=t.currentTarget.value,this.formEvent.emit({name:this.formId,key:this.name,type:"select",value:this.inputValue})}componentWillRender(){this.multiple&&(this.extraProps.multiple=!0)}render(){return s(i,null,s("corejam-box",{flex:!0,direction:"col",w:"12",mb:3},s("corejam-box",{mb:2},s("label",{htmlFor:this.name},s("corejam-type",{size:"sm",color:"gray-500"},this.label))),s("select",Object.assign({id:this.name,name:this.name},this.extraProps),this.options.map((t=>{const e={};return t.selected&&(e.selected=!0),s("option",Object.assign({value:t.value},e),t.key)})))))}get el(){return o(this)}};export{r as corejam_form_select}