"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.DynamicStrokeIconDecoration = void 0;
var _react = require("@emotion/react");
var _primitives = require("@atlaskit/primitives");
/**
 * @jsxRuntime classic
 * @jsx jsx
 */
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766

// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss

var barStyles = (0, _react.css)({
  position: 'absolute',
  left: 0,
  right: 0,
  top: '18px',
  margin: 'auto',
  width: "var(--ds-space-200, 16px)",
  height: '3px'
});
var textColorIconWrapper = (0, _primitives.xcss)({
  position: 'relative'
});
var getBackground = function getBackground(selectedColor, disabled) {
  if (selectedColor) {
    return selectedColor;
  }
  return disabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)";
};
var DynamicStrokeIconDecoration = exports.DynamicStrokeIconDecoration = function DynamicStrokeIconDecoration(_ref) {
  var selectedColor = _ref.selectedColor,
    disabled = _ref.disabled,
    icon = _ref.icon;
  return (0, _react.jsx)(_primitives.Box, {
    xcss: textColorIconWrapper
  }, icon, (0, _react.jsx)("div", {
    "data-testid": "toolbar-icon-dynamic-stroke",
    style: {
      background: getBackground(selectedColor, disabled)
    },
    css: barStyles
  }));
};