import{r as t,h as i,g as s}from"./p-3ba9c73c.js";import{l as e}from"./p-2b74e80e.js";import{E as h}from"./p-b72d14f0.js";const n=class{constructor(i){t(this,i),this.question="",this.required=!1,this.step=1,this.min=1,this.max=5,this.minText="",this.maxText="",this.labelQuestion="Formulate your question",this.labelRequired="Required",this.labelStep="Step size",this.labelMin="Min",this.labelMax="Max",this.labelMinText="Text left",this.labelMaxText="Text right",this._link=e(this,this.handleInput),this._question=this._link("question"),this._required=this._link("required"),this._step=this._link("step"),this._min=this._link("min"),this._max=this._link("max"),this._minText=this._link("minText"),this._maxText=this._link("maxText")}handleInput(t,i){const s=i.target;s&&(i.cancelBubble=!0,this[t]=s.value,this.value=this.updateValue({[t]:s.value}),this.el.dispatchEvent(new Event("input",{bubbles:!0})))}updateValue(t={}){return Object.assign({},{question:this.question,required:this.required,step:this.step,min:this.min,max:this.max,minText:this.minText,maxText:this.maxText},t)}componentDidLoad(){this.value=this.updateValue(),this.el.dispatchEvent(new Event("input",{bubbles:!0}))}render(){return i(h,{question:this._question,required:this._required},i("bce-input",Object.assign({type:"number"},this._step)),i("bce-input",Object.assign({type:"number"},this._min)),i("bce-input",Object.assign({type:"number"},this._max)),i("bce-input",Object.assign({type:"text"},this._minText)),i("bce-input",Object.assign({type:"text"},this._maxText)))}get el(){return s(this)}};export{n as bce_element_slider_template};