import{r as t,h as e}from"./p-aee8b1df.js";import{E as i}from"./p-433f8f9a.js";const o=class{constructor(e){t(this,e),this.handleOther=t=>{this.handler.set("options",t.target.value,{localize:!0}),this.handler.set("other",t.detail,{emit:!0,localize:!0})},this.transformMax={path:"validation",get:t=>`max:${t}`,set:t=>t.slice(4)}}prop(t,e={}){return this.handler.prop(t,Object.assign({},e))}render(){const{options:t}=this.value;return e(i,{question:this.prop("question",{localize:!0}),required:this.prop("required"),t:this.t},e("bce-option-creator",Object.assign({},this.prop("options",{default:()=>[],localize:!0}),{"allow-other":!0,label:this.t("me-option"),other:this.handler.tryGet("other",{localize:!0}),placeholder:this.t("me-option"),t:this.t,onOther:this.handleOther})),e("bce-input",Object.assign({},this.prop("max",{transform:this.transformMax}),{label:this.t("me-element-checkbox-max"),max:""+t.length,min:t.length?"1":"0",type:"number"})),e("bce-select",Object.assign({},this.prop("orientation"),{label:this.t("me-orientation"),type:"radio"}),e("bce-option",{value:"horizontal"},this.t("me-orientation-h")),e("bce-option",{value:"vertical"},this.t("me-orientation-v"))),e("slot",null))}};export{o as bce_element_checkbox_editor};