define(["exports","./../../layoutmanager.js","./../../input/keyboard.js"],function(_exports,_layoutmanager,_keyboard){function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function onKeyDown(e){"Enter"===_keyboard.default.normalizeKeyFromEvent(e)&&(e.preventDefault(),e.repeat||(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))))}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!modules/emby-elements/emby-radio/emby-radio.css"]);var inputId=0;function onInit(){this.hasInit||(this.hasInit=!0,this.id||(this.id="embyradio"+inputId,inputId++),this.addEventListener("keydown",onKeyDown))}var EmbyRadio=function(_HTMLInputElement){function EmbyRadio(){babelHelpers.classCallCheck(this,EmbyRadio),t=this,o=EmbyRadio,o=babelHelpers.getPrototypeOf(o);var o,e,t=o=babelHelpers.possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],babelHelpers.getPrototypeOf(t).constructor):o.apply(t,e));return onInit.call(t),babelHelpers.possibleConstructorReturn(o,t)}return babelHelpers.inherits(EmbyRadio,_HTMLInputElement),babelHelpers.createClass(EmbyRadio,[{key:"connectedCallback",value:function(){onInit.call(this),function(){var labelElement;this.classList.contains("emby-radio")||(_layoutmanager.default.tv?this.classList.add("emby-radio","emby-radio-tv"):this.classList.add("emby-radio"),(labelElement=this.parentNode).classList.add("emby-radio-label"),labelElement.querySelector("span").classList.add("radioButtonLabel"),labelElement.insertAdjacentHTML("beforeend",'<span class="emby-radio-focusoutline"></span><span class="emby-radio-outer-circle"></span><span class="emby-radio-inner-circle"></span>'))}.call(this)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("keydown",onKeyDown)}}])}(babelHelpers.wrapNativeSuper(HTMLInputElement));customElements.define("emby-radio",EmbyRadio,{extends:"input"}),_exports.default=EmbyRadio});