import{h as s,b as a}from"./index-Bphhj8Un.js";import{l as e}from"./label-BEOW9ltS-Dwb4BBIM.js";import"./variant-quote-CHD0qMkY-Di-MtwAe.js";import{B as i}from"./base-controller-CXhqh4cR-D2BOZI1P.js";const n=a.forBlock("kol-click-button"),r=n(),u=n("label"),h=({label:l,handleClick:t,refButton:o})=>s("button",{class:r,ref:o,onClick:t,onKeyDown:c=>c.preventDefault()},s("span",{class:u},l)),C={required:[e]};class k extends i{constructor(t){super(t,C),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){e.apply(t,o=>{this.setRenderProp("label",o)})}focus(){var t;(t=this.buttonRef)===null||t===void 0||t.focus()}}export{k as C,h as a};
//# sourceMappingURL=controller-D8VbW1PO-D496N7CR.js.map
