"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.iconOnlySpacing = exports.getButtonStyles = void 0;
var _adfSchema = require("@atlaskit/adf-schema");
var _colors = require("@atlaskit/theme/colors");
var iconOnlySpacing = exports.iconOnlySpacing = {
  '&&': {
    padding: '0px',
    /**
      Increased specificity here because css for .hyperlink-open-link defined in
      packages/editor/editor-core/src/ui/ContentStyles/index.tsx file
      overrides padding left-right 2px with 4px.
    */
    '&&[href]': {
      padding: '0 2px'
    }
  },
  '& > span': {
    margin: '0px'
  }
};
var getStyles = function getStyles(property, _ref) {
  var _ref$appearance = _ref.appearance,
    appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
    _ref$state = _ref.state,
    state = _ref$state === void 0 ? 'default' : _ref$state,
    _ref$mode = _ref.mode,
    mode = _ref$mode === void 0 ? 'light' : _ref$mode;
  if (!property[appearance] || !property[appearance][state]) {
    return 'initial';
  }
  return property[appearance][state][mode];
};
var background = {
  danger: {
    default: {
      light: 'inherit',
      dark: 'inherit'
    },
    hover: {
      light: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30A, ")"),
      dark: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30A, ")")
    },
    active: {
      light: "var(--ds-background-neutral-pressed, ".concat("".concat((0, _adfSchema.hexToRgba)(_colors.B75, 0.6)), ")"),
      dark: "var(--ds-background-neutral-pressed, ".concat("".concat((0, _adfSchema.hexToRgba)(_colors.B75, 0.6)), ")")
    }
  }
};
var color = {
  danger: {
    default: {
      light: "var(--ds-icon, ".concat(_colors.N400, ")"),
      dark: "var(--ds-icon, ".concat(_colors.DN400, ")")
    },
    hover: {
      light: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
      dark: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
    },
    active: {
      light: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
      dark: "var(--ds-icon-danger, ".concat(_colors.R400, ")")
    }
  }
};
var getButtonStyles = exports.getButtonStyles = function getButtonStyles(props) {
  return {
    background: getStyles(background, props),
    color: getStyles(color, props)
  };
};