"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatReason = exports.LINK_TO_THRESHOLD_EXPLORER = void 0; var _ruleDataUtils = require("@kbn/rule-data-utils"); /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ // Putting undefined value in the link will hide the View In App button as requested in to https://github.com/elastic/kibana/issues/159782 const LINK_TO_THRESHOLD_EXPLORER = undefined; exports.LINK_TO_THRESHOLD_EXPLORER = LINK_TO_THRESHOLD_EXPLORER; const formatReason = ({ fields }) => { var _fields$ALERT_REASON; const reason = (_fields$ALERT_REASON = fields[_ruleDataUtils.ALERT_REASON]) !== null && _fields$ALERT_REASON !== void 0 ? _fields$ALERT_REASON : '-'; const link = LINK_TO_THRESHOLD_EXPLORER; return { reason, link }; }; exports.formatReason = formatReason;