import{h as s,c as a}from"./index-DpEJCboz.js";import{B as c,w as i,l as r}from"./base-controller-BGteZxSE-D44Ic5i1.js";const e=a.forBlock("kol-click-button"),u=e(),b=e("label"),B=({label:l,handleClick:t,refButton:o})=>s("button",{class:u,ref:o,onClick:t,onKeyDown:n=>n.preventDefault()},s("span",{class:b},l));class f extends c{constructor(t={}){super(t,{label:""}),this.handleClick=()=>{console.log(this,this.buttonRef,"button clicked")},this.setButtonRef=o=>{this.buttonRef=o}}componentWillLoad(t){const{label:o}=t;this.watchLabel(o)}watchLabel(t){i(r,t,o=>{this.setProp("label",o)})}focus(){var t;(t=this.buttonRef)===null||t===void 0||t.focus()}}export{f as C,B as a};
//# sourceMappingURL=controller-De_Qbk_S-DUTQe95w.js.map
