import{r as e,c as l,h as s,H as i,g as t}from"./p-9f21f85f.js";const n=class{constructor(s){e(this,s),this.cellFormCancel=l(this,"cellFormCancel",7),this.cellFormSubmit=l(this,"cellFormSubmit",7)}async focus(){var e,l;null===(l=null===(e=this.el.querySelector("dvn-select"))||void 0===e?void 0:e.focusOnInput)||void 0===l||l.call(e)}render(){const{field:e,value:l}=this,{options:t=[]}=e;return s(i,null,s("dvn-select",{dataAdapter:e.dataAdapter,dataProvider:e.dataProvider,disabled:e.disabled,leaned:!0,value:l,width:"100%",scale:"small",onClick:e=>{e.stopImmediatePropagation()},onBlur:e=>{e.stopImmediatePropagation(),this.cellFormCancel.emit()},onChange:e=>{e.stopImmediatePropagation(),this.cellFormSubmit.emit({value:e.detail}),this.cellFormCancel.emit()}},t.map((e=>s("dvn-select-option",{value:e.value},e.label)))))}get el(){return t(this)}};n.style="dvn-field-input-cell-single-choice{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%}";export{n as dvn_field_input_cell_single_choice}