define(["exports","./../globalize.js","./../../emby-apiclient/connectionmanager.js"],function(_exports,_globalize,_connectionmanager){function showErrorMessage(){return options=_globalize.default.translate("MessagePlayAccessRestricted"),Emby.importModule("./modules/common/dialogs/alert.js").then(function(alert){return alert(options)}).then(function(){return Promise.reject()});var options}function PlayAccessValidation(){this.name="Playback validation",this.type="preplayintercept",this.id="playaccessvalidation",this.order=-2}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0,PlayAccessValidation.prototype.intercept=function(options){var item=options.item;return(item=item&&item.ServerId)?_connectionmanager.default.getApiClient(item).getCurrentUser().then(function(user){return user.Policy.EnableMediaPlayback?Promise.resolve():options.fullscreen?showErrorMessage():Promise.reject()}):Promise.resolve()},_exports.default=PlayAccessValidation});