import { ApplicationContext } from '@sankhyalabs/core';
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
function getMessage(application, key, params) {
  var _a;
  return (_a = application === null || application === void 0 ? void 0 : application.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
}
export default function fileViewer({ fileSessionKey, isDownload }) {
  const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
  window.open(`${window.location.protocol}//${window.location.hostname}:${window.location.port}/mge/visualizadorArquivos.mge?chaveArquivo=${fileSessionKey}${isDownload ? "&download=S" : ""}`);
  ApplicationUtils.info(getMessage(application, "fileViewer.message.exportSuccess"), { iconName: "check" });
}
