define(["exports","./commandprocessor.js","./common/itemmanager/itemmanager.js"],function(_exports,_commandprocessor,_itemmanager){function getResolveFn(id,changed){return function(result){return Promise.resolve({command:id,updated:changed,result:result})}}function executeCommand(items,id,options){switch(id){case"multiselect":case"connecttoserver":case"scan":case"refresh":return _commandprocessor.default.executeCommand(id,items,options),getResolveFn(id)();default:return _commandprocessor.default.executeCommand(id,items,options).then(getResolveFn(id))}}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;_exports.default={show:function(options){var commands=_itemmanager.default.getCommands(options),items=options.items;return function(options){return Emby.importModule("./modules/actionsheet/actionsheet.js").then(function(ActionSheet){return ActionSheet.show(options)})}({items:commands,positionTo:options.positionTo,positionY:options.positionY,positionX:options.positionX,positionClientY:options.positionClientY,positionClientX:options.positionClientX,transformOrigin:options.transformOrigin,item:1===items.length?items[0]:null,blurBackground:!0,noTextWrap:!0,hasItemIcon:!0,linkToItem:!1!==options.play,lowerLowResThreshold:!0}).then(function(id){return executeCommand(items,id,options)}).then(function(result){return Promise.resolve(result)},function(err){return Promise.reject(err)})},executeCommand:executeCommand}});