"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getRadioUncheckedDataUri = exports.getRadioCheckedDataUri = exports.getBorderColor = exports.getFillColor = void 0;

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

var getFillColor = function getFillColor(theme) {
  return (0, _branding.getPaletteColor)('brand-secondary-base')({
    theme: theme
  });
};

exports.getFillColor = getFillColor;

var getBorderColor = function getBorderColor(theme) {
  return (0, _branding.getPaletteColor)('greyscale-light')({
    theme: theme
  });
};

exports.getBorderColor = getBorderColor;

var getUncheckedSVG = function getUncheckedSVG(color) {
  return "\n  <svg width=\"44px\" height=\"44px\" viewBox=\"0 0 44 44\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n    <g id=\"Icons/Radio-Selected\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n      <circle stroke=\"".concat(color, "\" strokeWidth=\"1.5\" cx=\"22\" cy=\"22\" r=\"11.25\" />\n    </g>\n  </svg>\n");
};

var getCheckedSVG = function getCheckedSVG(color) {
  return "\n  <svg width=\"44px\" height=\"44px\" viewBox=\"0 0 44 44\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n    <g stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n      <path d=\"M22,34 C15.372583,34 10,28.627417 10,22 C10,15.372583 15.372583,10 22,10 C28.627417,10 34,15.372583 34,22 C34,28.627417 28.627417,34 22,34 Z M22,26 C24.209139,26 26,24.209139 26,22 C26,19.790861 24.209139,18 22,18 C19.790861,18 18,19.790861 18,22 C18,24.209139 19.790861,26 22,26 Z\" fill=\"".concat(color, "\" />\n    </g>\n  </svg>\n");
};

var getRadioCheckedDataUri = function getRadioCheckedDataUri(_ref) {
  var theme = _ref.theme;
  var rawColor = getFillColor(theme);
  var color = rawColor != null ? rawColor : 'gray';
  return "data:image/svg+xml;utf8,".concat(encodeURIComponent(getCheckedSVG(color)));
};

exports.getRadioCheckedDataUri = getRadioCheckedDataUri;

var getRadioUncheckedDataUri = function getRadioUncheckedDataUri(_ref2) {
  var theme = _ref2.theme;
  var rawColor = getBorderColor(theme);
  var color = rawColor != null ? rawColor : 'gray';
  return "data:image/svg+xml;utf8,".concat(encodeURIComponent(getUncheckedSVG(color)));
};

exports.getRadioUncheckedDataUri = getRadioUncheckedDataUri;