define(["browser","dom","css!./emby-input"],function(browser,dom){"use strict";var inputId=0;function onInit(){var document,label,parentNode=this.parentNode;parentNode&&(this.hasInit||(this.hasInit=!0,this.id||(this.id="embyinput"+inputId,inputId++),this.classList.contains("emby-input")||(this.classList.add("emby-input"),document=this.ownerDocument,(label=document.createElement("label")).innerHTML=this.getAttribute("label")||"",label.classList.add("inputLabel"),label.classList.add("inputLabelUnfocused"),label.htmlFor=this.id,parentNode.insertBefore(label,this),this.labelElement=label,dom.addEventListener(this,"focus",function(){document.attachIME&&document.attachIME(this),label.classList.add("inputLabelFocused"),label.classList.remove("inputLabelUnfocused")},{passive:!0}),dom.addEventListener(this,"blur",function(){label.classList.remove("inputLabelFocused"),label.classList.add("inputLabelUnfocused")},{passive:!0}),browser.orsay&&this===document.activeElement&&document.attachIME&&document.attachIME(this))))}var EmbyInput=function(_HTMLInputElement){babelHelpers.inherits(EmbyInput,_HTMLInputElement);var _super=_createSuper(EmbyInput);function EmbyInput(){var _this;babelHelpers.classCallCheck(this,EmbyInput);var self=_this=_super.call(this);return onInit.call(self),babelHelpers.possibleConstructorReturn(_this,self)}return babelHelpers.createClass(EmbyInput,[{key:"connectedCallback",value:function(){onInit.call(this),this.labelElement.htmlFor=this.id}},{key:"label",value:function(text){this.labelElement.innerHTML=text}}]),EmbyInput}(babelHelpers.wrapNativeSuper(HTMLInputElement));customElements.define("emby-input",EmbyInput,{extends:"input"})});