"use strict";

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

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

var _react = _interopRequireWildcard(require("react"));

var _styledComponents = require("styled-components");

var _radioOption = require("./radio-option.proptypes");

var _radioOption2 = require("./radio-option.css-rules");

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

var RadioOption = function RadioOption(_ref) {
  var selected = _ref.selected;
  var theme = (0, _react.useContext)(_styledComponents.ThemeContext);
  return _react["default"].createElement("svg", {
    width: "44px",
    height: "44px",
    viewBox: "0 0 44 44",
    version: "1.1",
    xmlns: "http://www.w3.org/2000/svg"
  }, _react["default"].createElement("g", {
    id: "Icons/Radio-Selected",
    stroke: "none",
    strokeWidth: "1",
    fill: "none",
    fillRule: "evenodd"
  }, selected ? _react["default"].createElement("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",
    id: "Combined-Shape",
    fill: (0, _radioOption2.getFillColor)(theme)
  }) : _react["default"].createElement("circle", {
    id: "Oval-3",
    stroke: (0, _radioOption2.getBorderColor)(theme),
    strokeWidth: "1.5",
    cx: "22",
    cy: "22",
    r: "11.25"
  })));
};

exports.RadioOption = RadioOption;
RadioOption.displayName = 'RadioOption';
RadioOption.propTypes = _radioOption.radioOptionPropTypes;