import{r as i,c as r,h as o,g as a}from"./p-f06dc8f3.js";import{m as e}from"./p-84ba0a57.js";const t=class{constructor(o){i(this,o),this.onselect=r(this,"onselect",7),this.selected=!1,this.disabled=!1,this.error=!1,this.required=!1,this.requiredMessage="Este campo es requerido",this.iconPosition="left",this.outline=!1,this.full=!1,this._grouped=!1,this._focus=!1,this.containerClass=()=>e("ibk-radio",[this.iconPosition,{outline:this.outline},{selected:this.selected},{disabled:this.disabled},{error:this.error},{full:this.full},{focus:this._focus}])}componentWillLoad(){this.groupVerification()}changeRadio(){this.host.setAttribute("selected",""),this.host.removeAttribute("error"),this.onselect.emit({selected:this.selected,value:this.value})}groupVerification(){const i=this.host.closest("ibk-radio-group");this._grouped=null!=i}onRadioFocusIn(){this._focus=!0}onRadioFocusOut(){this._focus=!1}render(){return o("div",{class:this.containerClass()},o("label",{class:"ibk-radio__label"},o("input",{class:"ibk-radio__hidden",checked:this.selected,type:"radio",value:this.value}),o("span",{class:"ibk-radio__icon"},o("i",{class:"ibk-radio__dot"})),o("span",{class:"ibk-radio__text",innerHTML:this.label})),!this._grouped&&this.error&&o("span",{class:"ibk-radio__error-message",innerHTML:this.requiredMessage}))}get host(){return a(this)}};t.style=".ibk-radio{padding:5px 0}.ibk-radio *{box-sizing:border-box}.ibk-radio__hidden{display:none}.ibk-radio__label{display:inline-flex;align-items:center;color:var(--grayText);cursor:pointer}.ibk-radio__icon{display:inline-flex;align-items:center;justify-content:center;min-height:18px;min-width:18px;border:2px solid var(--gray4);border-radius:50%;margin-right:7px;transition:var(--fast)}.ibk-radio__dot{display:block;height:10px;width:10px;border-radius:50%;background-color:var(--primaryGreen1);transform:scale(0);transition:var(--fast)}.ibk-radio__label:active{transform:translateY(1px)}.ibk-radio__text{font-family:var(--fontGeometria);font-size:14px;font-weight:500}.ibk-radio__text a{text-decoration:none;color:var(--primaryGreen1)}.ibk-radio__error-message{color:var(--extendedWatermelon1);font-size:12px;font-family:var(--fontMontserrat);font-weight:500;min-height:15px;margin-top:7px;display:block}.ibk-radio--selected .ibk-radio__icon{border-color:var(--primaryGreen1)}.ibk-radio--selected .ibk-radio__dot{transform:scale(1)}.ibk-radio--disabled{pointer-events:none}.ibk-radio--disabled .ibk-radio__icon{background-color:var(--gray4);border-color:var(--gray2)}.ibk-radio--error .ibk-radio__icon{border-color:var(--extendedWatermelon1)}.ibk-radio--right .ibk-radio__label{justify-content:space-between}.ibk-radio--right .ibk-radio__icon{margin-right:0;margin-left:7px;order:2}.ibk-radio--outline .ibk-radio__label{border:1px solid var(--gray4);border-radius:4px;padding:10px}.ibk-radio--full .ibk-radio__label{width:100%}.ibk-radio--focus .ibk-radio__icon{border-color:var(--primaryGreen1)}";export{t as ibk_radio}