"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.highlightColorPalette = exports.REMOVE_HIGHLIGHT_COLOR = exports.EditorDiagonalLineIcon = void 0;
var _react = require("@emotion/react");
var _adfSchema = require("@atlaskit/adf-schema");
var _useThemeObserver2 = require("@atlaskit/tokens/use-theme-observer");
var _getColorMessage = _interopRequireDefault(require("./getColorMessage"));
var _mapPaletteColor = require("./mapPaletteColor");
var _paletteMessages = _interopRequireDefault(require("./paletteMessages"));
/**
 * @jsxRuntime classic
 * @jsx jsx
 */

// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic

var REMOVE_HIGHLIGHT_COLOR = exports.REMOVE_HIGHLIGHT_COLOR = '#00000000';

// Custom icon ejection - these icons have been migrated away from the deprecated Custom / SVG components to native SVG. Please review whether this icon should be contributed to @atlaskit/icon-lab or whether it can be replaced by an existing icon from either @atlaskit/icon or @atlaskit/icon-lab
var DiagonalLineGlyph = function DiagonalLineGlyph(props) {
  return (0, _react.jsx)("svg", {
    width: "24",
    height: "24",
    viewBox: "0 0 24 24",
    fill: "none",
    xmlns: "http://www.w3.org/2000/svg"
    // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
    ,
    style: props.style
  }, (0, _react.jsx)("rect", {
    width: "24",
    height: "24",
    fill: "white",
    fillOpacity: "0.01"
  }), (0, _react.jsx)("path", {
    fillRule: "evenodd",
    clipRule: "evenodd",
    d: "M17.2038 7.70388C17.5955 8.09565 17.5941 8.73128 17.2005 9.12127L9.1213 17.1277C8.73027 17.5152 8.09958 17.5138 7.71031 17.1245C7.31854 16.7328 7.31997 16.0971 7.71351 15.7071L15.7928 7.70069C16.1838 7.31318 16.8145 7.31461 17.2038 7.70388Z",
    fill: "currentColor",
    fillOpacity: "0.5"
  }));
};

// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
var EditorDiagonalLineIcon = exports.EditorDiagonalLineIcon = function EditorDiagonalLineIcon() {
  var _useThemeObserver = (0, _useThemeObserver2.useThemeObserver)(),
    colorMode = _useThemeObserver.colorMode;
  var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #6B6E76)" : "var(--ds-background-accent-gray-subtle, #8C8F97)";
  return (
    // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
    (0, _react.jsx)(DiagonalLineGlyph, {
      style: {
        color: primaryColor
      }
    })
  );
};

// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
var highlightColorPalette = exports.highlightColorPalette = [{
  value: REMOVE_HIGHLIGHT_COLOR,
  label: 'No color',
  // Mostly informative, only used for analytics
  border: "var(--ds-border, #0B120E24)",
  message: (0, _getColorMessage.default)(_paletteMessages.default, 'no-color'),
  decorator: (0, _react.jsx)(EditorDiagonalLineIcon, null)
}];
_adfSchema.backgroundColorPalette.forEach(function (label, color) {
  highlightColorPalette.push((0, _mapPaletteColor.mapPaletteColor)(label, color));
});