"use strict";

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

var _lodash = require("lodash");

function baseStyleTrack(props) {
  const {
    colorScheme: c,
    theme
  } = props;
  return c ? {
    false: theme.colors.light[0],
    true: theme.colors[c][2]
  } : undefined;
}

function baseStyleThumb(props) {
  return props.checked ? props.onColor ? (0, _lodash.get)(props.theme.colors, props.onColor) : undefined : props.offColor ? (0, _lodash.get)(props.theme.colors, props.offColor) : undefined;
}

const baseStyle = props => ({
  trackColor: baseStyleTrack(props),
  thumbColor: baseStyleThumb(props)
});

const sizes = {
  sm: {
    transform: [{
      scale: 0.5
    }]
  },
  md: {},
  lg: {
    transform: [{
      scale: 1.5
    }],
    margin: 4
  }
};
const defaultProps = {
  size: 'md',
  colorScheme: 'default'
};
var _default = {
  baseStyle,
  sizes,
  defaultProps
};
exports.default = _default;
//# sourceMappingURL=switch.js.map