"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getFontColor = exports.getFillColor = exports.getStrokeColor = void 0;

var _branding = require("../../../mixins/branding");

var _icon = require("../icon.css-rules");

var getStrokeColor = function getStrokeColor(theme, disabled, inverted, colorName) {
  if (inverted) {
    return (0, _branding.getPaletteColor)('white')({
      theme: theme
    });
  }

  if (disabled) {
    return (0, _icon.getDisabledFillColor)({
      theme: theme
    });
  }

  return (0, _branding.getPaletteColor)(colorName || 'brand-primary-base')({
    theme: theme
  });
};

exports.getStrokeColor = getStrokeColor;

var getFillColor = function getFillColor(theme, disabled, inverted, colorName) {
  if (inverted) {
    return (0, _branding.getPaletteColor)('white')({
      theme: theme
    });
  }

  if (disabled) {
    return (0, _icon.getDisabledFillColor)({
      theme: theme
    });
  }

  return (0, _branding.getPaletteColor)(colorName || 'brand-primary-base')({
    theme: theme
  });
};

exports.getFillColor = getFillColor;

var getFontColor = function getFontColor(theme, disabled, inverted, colorName) {
  if (disabled && inverted) {
    return (0, _icon.getDisabledFillColor)({
      theme: theme
    });
  }

  if (inverted) {
    return (0, _branding.getPaletteColor)(colorName || 'brand-primary-base')({
      theme: theme
    });
  }

  if (disabled) {
    return (0, _branding.getPaletteColor)('white')({
      theme: theme
    });
  }

  return (0, _icon.getFontColor)(theme);
};

exports.getFontColor = getFontColor;