"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FleetServerMissingPrivileges = void 0;
var _react = _interopRequireDefault(require("react"));
var _eui = require("@elastic/eui");
var _i18nReact = require("@kbn/i18n-react");
var _styledComponents = _interopRequireDefault(require("styled-components"));
/*
 * 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 Panel = (0, _styledComponents.default)(_eui.EuiPanel)`
  max-width: 500px;
  margin-right: auto;
  margin-left: auto;
`;
const FleetServerMissingPrivileges = () => {
  return /*#__PURE__*/_react.default.createElement(Panel, {
    "data-test-subj": "fleetServerMissingPrivilegesPrompt"
  }, /*#__PURE__*/_react.default.createElement(_eui.EuiEmptyPrompt, {
    iconType: "securityApp",
    title: /*#__PURE__*/_react.default.createElement("h2", {
      "data-test-subj": "fleetServerMissingPrivilegesTitle"
    }, /*#__PURE__*/_react.default.createElement(_i18nReact.FormattedMessage, {
      id: "xpack.fleet.fleetServerSetupPermissionDeniedErrorTitle",
      defaultMessage: "Permission denied"
    })),
    body: /*#__PURE__*/_react.default.createElement("p", {
      "data-test-subj": "fleetServerMissingPrivilegesMessage"
    }, /*#__PURE__*/_react.default.createElement(_i18nReact.FormattedMessage, {
      id: "xpack.fleet.fleetServerSetupPermissionDeniedErrorMessage",
      defaultMessage: "Fleet Server needs to be set up. This requires the {roleName} cluster privilege. Contact your administrator.",
      values: {
        roleName: /*#__PURE__*/_react.default.createElement(_eui.EuiCode, null, "\"manage_service_account\"")
      }
    }))
  }));
};
exports.FleetServerMissingPrivileges = FleetServerMissingPrivileges;