"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var switchWidth = 90;
var switchHeight = 40;
var compactSwitchWidth = 67;
var compactSwitchHeight = 28;
var circleIconWidth = 30;
var compactCircleIconWidth = 20;

var _default = function _default(theme) {
  return {
    switchComponent: {},
    toggleSwitchWrapper: {
      display: 'inline-flex',
      position: 'relative'
    },
    root: {
      width: function width(props) {
        return props.compact ? compactSwitchWidth : switchWidth;
      }
    },
    label: {
      fontWeight: 300,
      fontSize: 16,
      color: theme.palette.grey['500'],
      margin: '10px 0px',
      whiteSpace: 'nowrap',
      textOverflow: 'ellipsis',
      wordBreak: 'normal',
      wordWrap: 'normal',
      overflow: 'hidden',
      fontFamily: theme.typography.font.family2
    },
    icon: {
      width: function width(props) {
        return props.compact ? compactCircleIconWidth : circleIconWidth;
      },
      height: function height(props) {
        return props.compact ? compactCircleIconWidth : circleIconWidth;
      },
      backgroundColor: function backgroundColor(props) {
        return props.offColor || theme.palette.grey['400'];
      }
    },
    bar: {
      width: function width(props) {
        return props.compact ? compactSwitchWidth : switchWidth;
      },
      height: function height(props) {
        return props.compact ? compactSwitchHeight : switchHeight;
      },
      marginTop: function marginTop(props) {
        return props.compact ? -15 : -21;
      },
      marginLeft: function marginLeft(props) {
        return props.compact ? -26 : -41;
      },
      borderRadius: 25,
      border: "1px solid ".concat(theme.palette.grey['400']),
      backgroundColor: 'white'
    },
    checked: {
      transform: function transform(props) {
        return props.compact ? 'translateX(37px)' : 'translateX(50px)';
      },
      '& + $bar': {
        backgroundColor: 'white !important',
        opacity: 1
      },
      '& $icon': {
        backgroundColor: function backgroundColor(props) {
          return props.onColor || theme.palette.primary.color2;
        }
      }
    },
    offLabel: {
      position: 'absolute',
      top: 15,
      right: function right(props) {
        return props.compact ? 0 : 5;
      },
      fontFamily: theme.typography.font.family2,
      fontWeight: 500,
      color: theme.palette.grey['400'],
      fontSize: function fontSize(props) {
        return props.compact ? 14 : 16;
      }
    },
    onLabel: {
      position: 'absolute',
      top: 15,
      left: 15,
      fontFamily: theme.typography.font.family2,
      fontWeight: 500,
      color: theme.palette.blueGrey['50'],
      fontSize: function fontSize(props) {
        return props.compact ? 14 : 16;
      }
    }
  };
};

exports.default = _default;