define(["require","exports","tslib","immutable","react","modules/clean/filepath","modules/clean/react/file_viewer/constants","modules/clean/react_format","modules/clean/react/share_download/actions","modules/core/i18n"],(function(e,o,t,r,a,n,i,s,l,c){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),r=t.__importStar(r),a=t.__importDefault(a),n=t.__importStar(n),l=t.__importStar(l);var d={text:void 0,handler:void 0,spriteName:void 0,isDisabled:void 0,userAction:void 0},m=(function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(o,e),o.buildDirectOption=function(e,t){return void 0===t&&(t=null),new o({text:c._("Direct download"),handler:function(){l.direct(e,t)},spriteName:"download_arrow",userAction:i.UserAction.Download})},o.buildToDropboxOption=function(e,t,r,d,m,_){void 0===_&&(_=!1);var u=c._("Save to my Dropbox"),p="dropbox",f=i.UserAction.SaveToDropbox;if(d&&d.is_cdm_member){var b=n.filename(d.cdm_tmf_path);u=b.length>12?c._("Save to my member folder"):s.reactFormat(c._("Save to %(cdm_tmf_name)s folder"),{cdm_tmf_name:b,strong:a.default.createElement("strong",null)}),r.is_paired&&(p="s_briefcase",f=i.UserAction.SaveToDropboxWork)}else if(r.is_paired)switch(m){case"personal":u=c._("Save to personal Dropbox"),p="s_house",f=i.UserAction.SaveToDropboxPersonal;break;case"work":u=c._("Save to %(team_name)s Dropbox").format({team_name:r.team_name}),p="s_briefcase",f=i.UserAction.SaveToDropboxWork}return new o({text:u,handler:function(){l.toDropbox(e,t,m,d)},spriteName:p,isDisabled:_,userAction:f})},o})(r.Record(d));o.ShareDownloadActionOption=m})); //# sourceMappingURL=models.min.js-vflW9T8nE.map