text: define(["require","exports","tslib","external/react","modules/clean/analytics","modules/clean/em_string","modules/clean/filepath","modules/clean/react/copy_to_dropbox/actions","modules/clean/react/modal","modules/clean/react_format","modules/clean/viewer","modules/core/i18n","modules/core/notify"],function(e,t,o,r,a,n,s,i,l,m,c,p,d){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleAccept=function(){var e=t.getProgressMessage();d.Notify.success(e),i.copySharedFile(t.props.shareToken,t.props.userId,e)},t}return o.__extends(t,e),t.prototype.componentDidMount=function(){a.WebMiscActivityLogger.log("show-c2d-modal",{filename:this.props.fileOrFolder.filename})},t.prototype.getTitle=function(){var e=c.Viewer.get_viewer(),t=e.get_user_by_role(this.props.role),o=this.props.fileOrFolder.filename;if(t&&t.is_cdm_member)return p._("Save to your member folder?");if(e.is_paired)switch(this.props.role){case"personal":return p._("Save to your personal Dropbox account?");case"work":var r=e.team_name,a=new n.Emstring(r||"").length,s=Math.max(10,15-a);return p._("Save ‘%(filename)s’ to my %(team_name)s Dropbox").format({filename:n.Emstring.em_snippet(o,s),team_name:r})}return p._("Save ‘%(filename)s’ to my Dropbox").format({filename:n.Emstring.em_snippet(o,15)})},t.prototype.getBodyText=function(){var e=c.Viewer.get_viewer(),t=e.get_user_by_role(this.props.role),o=n.Emstring.em_snippet(this.props.fileOrFolder.filename,15);if(t&&t.is_cdm_member)return m.reactFormat(p._("<strong>%(file_name)s</strong> will be saved to the <strong>%(cdm_tmf_name)s</strong> folder in your %(team_name)s Dropbox account."),{file_name:o,cdm_tmf_name:s.filename(t.cdm_tmf_path),team_name:e.team_name,strong:r.createElement("strong",null)});if(e.is_paired)switch(this.props.role){case"personal":return m.reactFormat(p._("<strong>%(file_name)s</strong> will be saved to your personal Dropbox account and synced to any connected devices."),{file_name:o,strong:r.createElement("strong",null)});case"work":return this.props.fileOrFolder.is_dir?p._("This folder will be instantly saved to your %(team_name)s Dropbox and downloaded to all the computers linked to your %(team_name)s account.").format({team_name:e.team_name}):p._("This file will be instantly saved to your %(team_name)s Dropbox and downloaded to all the computers linked to your %(team_name)s account.").format({team_name:e.team_name})}return this.props.fileOrFolder.is_dir?p._("This folder will be instantly saved to your Dropbox and downloaded to all the computers linked to your account."):p._("This file will be instantly saved to your Dropbox and downloaded to all the computers linked to your account.")},t.prototype.getProgressMessage=function(){var e=c.Viewer.get_viewer();if(e.is_paired)switch(this.props.role){case"personal":return p._("Saving to your personal Dropbox...");case"work":return p._("Saving to your %(team_name)s Dropbox...").format({team_name:e.team_name})}return p._("Saving to your Dropbox...")},t.prototype.render=function(){return r.createElement(l.Modal,{title:this.getTitle(),acceptButtonText:p._("Save"),dismissButtonText:p._("Cancel"),onAccept:this.handleAccept,onDismiss:this.props.onDismiss,style:"default-maestro"},r.createElement("p",{className:"db-modal-message"},this.getBodyText()))},t})(r.Component);t.CopyToDropboxModal=u});
  //# sourceMappingURL=modal.min.js-vflUVJuzE.map