define(["exports","./../../registrationservices/registrationservices.js","./../../common/servicelocator.js"],function(_exports,_registrationservices,_servicelocator){function showElementIfUnlocked(elem,unlocks,index){var inverse,unlock=unlocks[index];unlock?(inverse=!1,(unlock=unlock).startsWith("!")&&(unlock=unlock.substring(1),inverse=!0),_servicelocator.iapManager.isUnlockedByDefault(unlock).then(function(){inverse?elem.classList.add("premirecontainer-forcehide"):showElementIfUnlocked(elem,unlocks,index+1)},function(){inverse?showElementIfUnlocked(elem,unlocks,index+1):elem.classList.add("premirecontainer-forcehide")})):elem.classList.remove("premirecontainer-forcehide")}function checkStatus(elem){_registrationservices.default.validateFeature("dvr",{showDialog:!1,viewOnly:!0}).then(function(){elem.classList.add("premirecontainer-forcehide")},function(){!function(elem){var showIfUnlocked=elem.getAttribute("data-showifunlocked");showElementIfUnlocked(elem,showIfUnlocked?showIfUnlocked.split(","):[],0)}(elem)})}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,require(["css!modules/emby-elements/emby-premierecontainer/emby-premierecontainer.css"]);var EmbyPremiereContainer=function(_HTMLDivElement){function EmbyPremiereContainer(){var _this,self=_this=_HTMLDivElement.call(this)||this;return function(){this.hasInit||(this.hasInit=!0,this.classList.add("premirecontainer-forcehide"))}.call(self),babelHelpers.possibleConstructorReturn(_this,self)}return babelHelpers.inherits(EmbyPremiereContainer,_HTMLDivElement),babelHelpers.createClass(EmbyPremiereContainer,[{key:"connectedCallback",value:function(){checkStatus(this)}},{key:"disconnectedCallback",value:function(){}}])}(babelHelpers.wrapNativeSuper(HTMLDivElement));customElements.define("emby-premierecontainer",EmbyPremiereContainer,{extends:"div"}),_exports.default=EmbyPremiereContainer});