define(["exports","./../../input/keyboard.js"],function(_exports,_keyboard){function onKeyDown(e){var key=_keyboard.default.normalizeKeyFromEvent(e);if("Enter"===key)return e.preventDefault(),e.repeat?void 0:(this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),!1)}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!modules/emby-elements/emby-checkbox/emby-checkbox.css","css!tv|modules/emby-elements/emby-checkbox/emby-checkbox_tv.css"]);var EmbyCheckbox=function(_HTMLInputElement){function EmbyCheckbox(){var _this;_this=_HTMLInputElement.call(this)||this;return babelHelpers.possibleConstructorReturn(_this,_this)}return babelHelpers.inherits(EmbyCheckbox,_HTMLInputElement),babelHelpers.createClass(EmbyCheckbox,[{key:"connectedCallback",value:function(){var labelElement;!this.hasAttribute("data-classes")&&(this.classList.add("emby-checkbox"),(labelElement=this.parentNode).classList.add("emby-checkbox-label"),labelElement=labelElement.querySelector("span"))&&(labelElement.classList.add("checkboxLabel"),labelElement.insertAdjacentHTML("afterend",'<div class="emby-checkbox-focusoutline"></div>')),-1!==this.tabIndex&&this.addEventListener("keydown",onKeyDown)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("keydown",onKeyDown)}}])}(babelHelpers.wrapNativeSuper(HTMLInputElement));customElements.define("emby-checkbox",EmbyCheckbox,{extends:"input"}),_exports.default=EmbyCheckbox});