"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MapperSizePluginSection = void 0;
var _react = _interopRequireDefault(require("react"));
var _i18n = require("@kbn/i18n");
var _i18nReact = require("@kbn/i18n-react");
var _eui = require("@elastic/eui");
var _documentation = require("../../../../services/documentation");
var _shared_imports = require("../../shared_imports");
/*
 * 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 MapperSizePluginSection = () => {
  return /*#__PURE__*/_react.default.createElement(_shared_imports.FormRow, {
    title: _i18n.i18n.translate('xpack.idxMgmt.mappingsEditor.sizeTitle', {
      defaultMessage: '_size'
    }),
    description: /*#__PURE__*/_react.default.createElement(_i18nReact.FormattedMessage, {
      id: "xpack.idxMgmt.mappingsEditor.sizeDescription",
      defaultMessage: "The Mapper Size plugin can index the size of the original {_source} field. {docsLink}",
      values: {
        docsLink: /*#__PURE__*/_react.default.createElement(_eui.EuiLink, {
          href: _documentation.documentationService.docLinks.plugins.mapperSize,
          target: "_blank"
        }, _i18n.i18n.translate('xpack.idxMgmt.mappingsEditor.sizeDocumentionLink', {
          defaultMessage: 'Learn more.'
        })),
        _source: /*#__PURE__*/_react.default.createElement(_eui.EuiCode, null, "_source")
      }
    })
  }, /*#__PURE__*/_react.default.createElement(_shared_imports.UseField, {
    path: "_size.enabled",
    component: _shared_imports.ToggleField,
    componentProps: {
      'data-test-subj': 'sizeEnabledToggle'
    }
  }));
};
exports.MapperSizePluginSection = MapperSizePluginSection;