import{r as i,c as e,h as t,H as o,g as s}from"./p-21516f8c.js";import{c as r,h as a}from"./p-86bff9b3.js";const n=":host{display:inline-block;position:relative;box-sizing:border-box;user-select:none;z-index:1}:host button{padding:0;display:flex;align-items:center;transition:color 0.25s ease;border:none;outline:none;background-color:transparent;line-height:var(--radio-line-height, 1.5);cursor:pointer}:host(:focus),:host(:hover){outline:none}:host(:focus) button,:host(:hover) button{color:#256EC1}.radio-icon{margin-left:0;margin-right:var(--radio-icon-margin-right, 0.5em);width:var(--radio-icon-size, 1.125em);height:var(--radio-icon-size, 1.125em)}.radio-icon-inner{fill:#ffffff;stroke:none}#radioLabel{font-family:var(--radio-label-font-family);font-size:var(--radio-label-font-size)}:host(.radio-checked) .radio-icon-inner{fill:#256EC1;stroke:none;transition:all 0.25s ease}.radio-icon,.radio-inner{box-sizing:border-box}:host(.radio-disabled){pointer-events:none}:host(.radio-disabled) .radio-icon-outer{fill:none;stroke:#222222;transition:all 0.25s ease}";const l=class{constructor(t){i(this,t);this.luStyle=e(this,"luStyle",7);this.luSelect=e(this,"luSelect",7);this.luDeselect=e(this,"luDeselect",7);this.luFocus=e(this,"luFocus",7);this.luBlur=e(this,"luBlur",7);this.canDeselect=false;this.disabled=false;this.checked=false;this.onFocus=()=>{this.hasFocus=true;this.luFocus.emit()};this.onBlur=()=>{this.hasFocus=false;this.luBlur.emit()}}checkedChanged(i){if(i){this.luSelect.emit({checked:true,value:this.value})}}onClick(){if(this.canDeselect||!this.checked){this.checked=!this.checked}}onKeyDown(i){if(i.key===" "&&(this.canDeselect||!this.checked)){this.checked=!this.checked}}render(){const{disabled:i,checked:e,color:s,el:n}=this;let l;if(this.labeledById){l=this.labeledById+"-lbl"}return t(o,{"aria-checked":e,"aria-disabled":i?"true":null,"aria-labelledby":l,class:Object.assign(Object.assign({},r(s)),{"in-item":a("lu-item",n),interactive:true,"radio-checked":e,"radio-disabled":i}),"data-is-radio-checked":this.checked,"has-focus":this.hasFocus,onBlur:this.onBlur,onFocus:this.onFocus,role:"radio",tabindex:"0"},t("button",{disabled:this.disabled,tabindex:"-1",type:"button"},t("svg",{class:"radio-icon",viewBox:"0 0 23 22"},t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},t("g",{id:"radio-unselected",transform:"translate(2.000000, 2.000000)",fill:"#FFFFFF",stroke:"#256EC1","stroke-width":"2"},t("path",{class:"radio-icon-outer",d:"M9.5,19 C3.9771525,19 -0.5,14.5228475 -0.5,9 C-0.5,3.4771525 3.9771525,-1 9.5,-1 C15.0228475,-1 19.5,3.4771525 19.5,9 C19.5,14.5228475 15.0228475,19 9.5,19 Z"}),t("path",{class:"radio-icon-inner",d:"M9.5,15 C12.8137085,15 15.5,12.3137085 15.5,9 C15.5,5.6862915 12.8137085,3 9.5,3 C6.1862915,3 3.5,5.6862915 3.5,9 C3.5,12.3137085 6.1862915,15 9.5,15 Z",id:"Oval-12-Copy-2"})))),t("span",{id:"radioLabel"},t("slot",null))))}get el(){return s(this)}static get watchers(){return{checked:["checkedChanged"]}}};l.style=n;export{l as lu_radio};
//# sourceMappingURL=p-e7aab00e.entry.js.map