'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

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

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _themeGet = require('../../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

var _icons = require('../../Icon/icons');

var _icons2 = _interopRequireDefault(_icons);

var _RadioInput = require('./RadioInput');

var _RadioInput2 = _interopRequireDefault(_RadioInput);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var SIZE = '30px';
var PADDING = '0.5em';
var BORDER_WIDTH = '2px';

var calcLabelColor = function calcLabelColor(_ref) {
  var disabled = _ref.disabled;

  if (disabled) return (0, _themeGet2.default)('colors.text.disabled');
  return (0, _themeGet2.default)('colors.text.default');
};

exports.default = _styledComponents2.default.label.withConfig({
  displayName: 'RadioLabel'
})(['display:block;cursor:pointer;position:relative;user-select:none;padding-left:calc(', ' + 10px);padding-top:4px;padding-bottom:5px;line-height:1.5;min-height:', ';color:', ';', ':enabled + &:hover::after,', ':enabled:focus + &::after{box-shadow:', ';}&::before{color:', ' !important;font-family:', ';text-align:center;width:', ';height:', ';display:block;position:absolute;top:50%;left:calc(', ' / 2);transform:translate(-50%,-50%);z-index:1;font-size:1.5em;line-height:1.5;transition:all 0.2s ease;}&::after{content:\'\';border-style:solid;border-radius:', ';border-width:', ';width:calc(', ' - 2 * ', ');height:calc(', ' - 2 * ', ');display:block;position:absolute;top:50%;left:calc(', ' / 2);transform:translate(-50%,-50%);transition:all 0.2s ease;}'], SIZE, SIZE, calcLabelColor, _RadioInput2.default, _RadioInput2.default, (0, _themeGet2.default)('shadows.focusOutline'), (0, _themeGet2.default)('colors.text.inverted'), (0, _themeGet2.default)('fonts.icon'), SIZE, SIZE, SIZE, SIZE, BORDER_WIDTH, SIZE, BORDER_WIDTH, SIZE, BORDER_WIDTH, SIZE);