"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.URL_PREFIX_DICT = exports.TRIGGER_TYPE_DICT = exports.REPORT_STATE_DICT = exports.REPORT_SOURCE_DICT = exports.REPORT_FORMAT_DICT = exports.BACKEND_TRIGGER_TYPE = exports.BACKEND_REPORT_STATE = exports.BACKEND_REPORT_SOURCE = exports.BACKEND_REPORT_FORMAT = exports.BACKEND_DELIVERY_FORMAT = void 0;

var _constants = require("../routes/utils/constants");

/*
 * Copyright OpenSearch Contributors
 * SPDX-License-Identifier: Apache-2.0
 */
let BACKEND_DELIVERY_FORMAT;
exports.BACKEND_DELIVERY_FORMAT = BACKEND_DELIVERY_FORMAT;

(function (BACKEND_DELIVERY_FORMAT) {
  BACKEND_DELIVERY_FORMAT["linkOnly"] = "LinkOnly";
  BACKEND_DELIVERY_FORMAT["attachment"] = "Attachment";
  BACKEND_DELIVERY_FORMAT["embedded"] = "Embedded";
})(BACKEND_DELIVERY_FORMAT || (exports.BACKEND_DELIVERY_FORMAT = BACKEND_DELIVERY_FORMAT = {}));

let BACKEND_REPORT_SOURCE;
exports.BACKEND_REPORT_SOURCE = BACKEND_REPORT_SOURCE;

(function (BACKEND_REPORT_SOURCE) {
  BACKEND_REPORT_SOURCE["dashboard"] = "Dashboard";
  BACKEND_REPORT_SOURCE["visualization"] = "Visualization";
  BACKEND_REPORT_SOURCE["savedSearch"] = "SavedSearch";
  BACKEND_REPORT_SOURCE["notebook"] = "Notebook";
})(BACKEND_REPORT_SOURCE || (exports.BACKEND_REPORT_SOURCE = BACKEND_REPORT_SOURCE = {}));

let BACKEND_REPORT_STATE;
exports.BACKEND_REPORT_STATE = BACKEND_REPORT_STATE;

(function (BACKEND_REPORT_STATE) {
  BACKEND_REPORT_STATE["scheduled"] = "Scheduled";
  BACKEND_REPORT_STATE["executing"] = "Executing";
  BACKEND_REPORT_STATE["success"] = "Success";
  BACKEND_REPORT_STATE["failed"] = "Failed";
})(BACKEND_REPORT_STATE || (exports.BACKEND_REPORT_STATE = BACKEND_REPORT_STATE = {}));

let BACKEND_REPORT_FORMAT;
exports.BACKEND_REPORT_FORMAT = BACKEND_REPORT_FORMAT;

(function (BACKEND_REPORT_FORMAT) {
  BACKEND_REPORT_FORMAT["pdf"] = "Pdf";
  BACKEND_REPORT_FORMAT["png"] = "Png";
  BACKEND_REPORT_FORMAT["csv"] = "Csv";
})(BACKEND_REPORT_FORMAT || (exports.BACKEND_REPORT_FORMAT = BACKEND_REPORT_FORMAT = {}));

let BACKEND_TRIGGER_TYPE;
exports.BACKEND_TRIGGER_TYPE = BACKEND_TRIGGER_TYPE;

(function (BACKEND_TRIGGER_TYPE) {
  BACKEND_TRIGGER_TYPE["download"] = "Download";
  BACKEND_TRIGGER_TYPE["onDemand"] = "OnDemand";
  BACKEND_TRIGGER_TYPE["cronSchedule"] = "CronSchedule";
  BACKEND_TRIGGER_TYPE["intervalSchedule"] = "IntervalSchedule";
})(BACKEND_TRIGGER_TYPE || (exports.BACKEND_TRIGGER_TYPE = BACKEND_TRIGGER_TYPE = {}));

const REPORT_STATE_DICT = {
  [_constants.REPORT_STATE.pending]: BACKEND_REPORT_STATE.executing,
  [_constants.REPORT_STATE.error]: BACKEND_REPORT_STATE.failed,
  [_constants.REPORT_STATE.shared]: BACKEND_REPORT_STATE.success,
  [_constants.REPORT_STATE.created]: BACKEND_REPORT_STATE.success
};
exports.REPORT_STATE_DICT = REPORT_STATE_DICT;
const REPORT_SOURCE_DICT = {
  [_constants.REPORT_TYPE.dashboard]: BACKEND_REPORT_SOURCE.dashboard,
  [_constants.REPORT_TYPE.visualization]: BACKEND_REPORT_SOURCE.visualization,
  [_constants.REPORT_TYPE.savedSearch]: BACKEND_REPORT_SOURCE.savedSearch,
  [_constants.REPORT_TYPE.notebook]: BACKEND_REPORT_SOURCE.notebook
};
exports.REPORT_SOURCE_DICT = REPORT_SOURCE_DICT;
const REPORT_FORMAT_DICT = {
  [_constants.FORMAT.csv]: BACKEND_REPORT_FORMAT.csv,
  [_constants.FORMAT.pdf]: BACKEND_REPORT_FORMAT.pdf,
  [_constants.FORMAT.png]: BACKEND_REPORT_FORMAT.png
};
exports.REPORT_FORMAT_DICT = REPORT_FORMAT_DICT;
const TRIGGER_TYPE_DICT = {
  [_constants.TRIGGER_TYPE.schedule]: [BACKEND_TRIGGER_TYPE.cronSchedule, BACKEND_TRIGGER_TYPE.intervalSchedule],
  [_constants.TRIGGER_TYPE.onDemand]: [BACKEND_TRIGGER_TYPE.onDemand, BACKEND_TRIGGER_TYPE.download]
};
exports.TRIGGER_TYPE_DICT = TRIGGER_TYPE_DICT;
const URL_PREFIX_DICT = {
  [BACKEND_REPORT_SOURCE.dashboard]: '/app/dashboards#/view/',
  [BACKEND_REPORT_SOURCE.savedSearch]: '/app/discover#/view/',
  [BACKEND_REPORT_SOURCE.visualization]: '/app/visualize#/edit/',
  [BACKEND_REPORT_SOURCE.notebook]: '/app/notebooks-dashboards?view=output_only#/'
};
exports.URL_PREFIX_DICT = URL_PREFIX_DICT;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 7668 characters]