"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.CloudDataTierCallout = void 0;
var _i18n = require("@kbn/i18n");
var _react = _interopRequireDefault(require("react"));
var _eui = require("@elastic/eui");
/*
 * 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.
 */

const i18nTexts = {
  title: _i18n.i18n.translate('xpack.indexLifecycleMgmt.editPolicy.cloudDataTierCallout.title', {
    defaultMessage: 'Migrate to data tiers'
  }),
  body: _i18n.i18n.translate('xpack.indexLifecycleMgmt.editPolicy.cloudDataTierCallout.body', {
    defaultMessage: 'Migrate your Elastic Cloud deployment to use data tiers.'
  }),
  linkText: _i18n.i18n.translate('xpack.indexLifecycleMgmt.editPolicy.cloudDataTierCallout.linkToCloudDeploymentDescription', {
    defaultMessage: 'View cloud deployment'
  })
};
/**
 * A call-to-action for users to migrate to data tiers if their cluster is still running
 * the deprecated node.data:true config.
 */
const CloudDataTierCallout = ({
  linkToCloudDeployment
}) => {
  return /*#__PURE__*/_react.default.createElement(_eui.EuiCallOut, {
    title: i18nTexts.title,
    "data-test-subj": "cloudDataTierCallout"
  }, i18nTexts.body, ' ', Boolean(linkToCloudDeployment) && /*#__PURE__*/_react.default.createElement(_eui.EuiLink, {
    href: linkToCloudDeployment,
    external: true
  }, i18nTexts.linkText));
};
exports.CloudDataTierCallout = CloudDataTierCallout;