define(["exports","./../../registrationservices/registrationservices.js","./../../common/servicelocator.js"],function(_exports,_registrationservices,_servicelocator){function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}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(){babelHelpers.classCallCheck(this,EmbyPremiereContainer),t=this,o=EmbyPremiereContainer,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 function(){this.hasInit||(this.hasInit=!0,this.classList.add("premirecontainer-forcehide"))}.call(t),babelHelpers.possibleConstructorReturn(o,t)}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});