"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.styles = exports.globalClasses = void 0;var _taggedTemplateLiteralLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteralLoose"));var _Emotion = require("../../lib/theming/Emotion");


var _Toggle = require("./Toggle.mixins");var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35;








var globalClasses = exports.globalClasses = (0, _Emotion.prefix)('toggle')({
  handle: 'handle',
  container: 'container',
  disabled: 'disabled',
  containerDisabled: 'container-disabled',
  containerLoading: 'container-loading',
  background: 'background'
});

var styles = exports.styles = (0, _Emotion.memoizeStyle)({
  root: function root(t) {
    return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n      display: inline-flex;\n      cursor: pointer;\n      align-items: baseline;\n      position: relative;\n\n      &::before {\n        // non-breaking space.\n        // makes a correct space for absolutely positioned button,\n        // and also height and baseline for toggle without caption.\n        content: '\\00A0';\n        display: inline-block;\n        flex: 0 0 auto;\n      }\n\n      &:hover .", " {\n        background: ", ";\n      }\n    "], ["\n      display: inline-flex;\n      cursor: pointer;\n      align-items: baseline;\n      position: relative;\n\n      &::before {\n        // non-breaking space.\n        // makes a correct space for absolutely positioned button,\n        // and also height and baseline for toggle without caption.\n        content: '\\\\00A0';\n        display: inline-block;\n        flex: 0 0 auto;\n      }\n\n      &:hover .", " {\n        background: ", ";\n      }\n    "])),














    globalClasses.handle,
    t.toggleBgHover);


  },
  rootSmall: function rootSmall(t) {
    return (0, _Emotion.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.toggleSizeMixin)(t.toggleFontSizeSmall, t.toggleHeightSmall, t.toggleWidthSmall));

  },
  rootMedium: function rootMedium(t) {
    return (0, _Emotion.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.toggleSizeMixin)(t.toggleFontSizeMedium, t.toggleHeightMedium, t.toggleWidthMedium));

  },
  rootLarge: function rootLarge(t) {
    return (0, _Emotion.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.toggleSizeMixin)(t.toggleFontSizeLarge, t.toggleHeightLarge, t.toggleWidthLarge));

  },

  disableAnimation: function disableAnimation() {
    return (0, _Emotion.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteralLoose2.default)(["\n      &,\n      * {\n        transition: none !important;\n      }\n    "])));





  },

  handle: function handle(t) {
    return (0, _Emotion.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteralLoose2.default)(["\n      bottom: ", ";\n      left: ", ";\n      position: absolute;\n      top: ", ";\n    "])),
    t.toggleBorderWidth,
    t.toggleHandleLeft,

    t.toggleHandleTop);

  },
  handleSmall: function handleSmall(t) {
    return (0, _Emotion.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.handleMixin)(t.toggleHandleSizeSmall, t.toggleHandleBorderRadiusSmall));

  },
  handleMedium: function handleMedium(t) {
    return (0, _Emotion.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.handleMixin)(t.toggleHandleSizeMedium, t.toggleHandleBorderRadiusMedium));

  },
  handleLarge: function handleLarge(t) {
    return (0, _Emotion.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.handleMixin)(t.toggleHandleSizeLarge, t.toggleHandleBorderRadiusLarge));

  },

  handleDisabled: function handleDisabled(t) {
    return (0, _Emotion.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteralLoose2.default)(["\n      background: ", " !important; // override root hover/active styles\n    "])),
    t.toggleDisabledHandleBg);

  },

  input: function input(t) {
    return (0, _Emotion.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteralLoose2.default)(["\n      position: absolute;\n      opacity: 0;\n\n      &:enabled {\n        ~ .", ", ~ .", " {\n          transition: 0.2s ease-in;\n        }\n        :not(:checked) {\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n        }\n        :checked {\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n        }\n      }\n      &:enabled:hover {\n        :not(:checked) {\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n        }\n        :checked {\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n        }\n      }\n      &:disabled {\n        :not(:checked) {\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n          ~ .", " {\n            background: ", " !important;\n            box-shadow: ", ";\n          }\n        }\n        :checked {\n          ~ .", " {\n            background: ", ";\n            box-shadow: ", ";\n          }\n          ~ .", " {\n            background: ", " !important;\n            box-shadow: ", ";\n          }\n        }\n      }\n    "])),




    globalClasses.container, globalClasses.handle,



    globalClasses.container,
    t.toggleContainerBg,
    t.toggleContainerBoxShadow,

    globalClasses.handle,
    t.toggleHandleBg,
    t.toggleHandleBoxShadow,



    globalClasses.container,
    t.toggleContainerBgChecked,
    t.toggleContainerBoxShadowChecked,

    globalClasses.handle,
    t.toggleHandleBgChecked,
    t.toggleHandleBoxShadowChecked,





    globalClasses.container,
    t.toggleContainerBgHover,
    t.toggleContainerBoxShadowHover,

    globalClasses.handle,
    t.toggleHandleBgHover,
    t.toggleHandleBoxShadowHover,



    globalClasses.container,
    t.toggleContainerBgCheckedHover,
    t.toggleContainerBoxShadowCheckedHover,

    globalClasses.handle,
    t.toggleHandleBgCheckedHover,
    t.toggleHandleBoxShadowCheckedHover,





    globalClasses.container,
    t.toggleContainerBgDisabled,
    t.toggleContainerBoxShadowDisabled,

    globalClasses.handle,
    t.toggleHandleBgDisabled,
    t.toggleHandleBoxShadowDisabled,



    globalClasses.container,
    t.toggleContainerBgDisabledChecked,
    t.toggleContainerBoxShadowDisabledChecked,

    globalClasses.handle,
    t.toggleHandleBgDisabledChecked,
    t.toggleHandleBoxShadowDisabledChecked);




  },
  inputSmall: function inputSmall(t) {
    return (0, _Emotion.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.inputSizeMixin)(t.toggleHeightSmall, t.toggleWidthSmall));

  },
  inputMedium: function inputMedium(t) {
    return (0, _Emotion.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.inputSizeMixin)(t.toggleHeightMedium, t.toggleWidthMedium));

  },
  inputLarge: function inputLarge(t) {
    return (0, _Emotion.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.inputSizeMixin)(t.toggleHeightLarge, t.toggleWidthLarge));

  },

  container: function container(t) {
    return (0, _Emotion.css)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteralLoose2.default)(["\n      box-shadow: inset 0 0 0 ", " ", ";\n      height: 100%;\n      overflow: hidden;\n      position: absolute;\n      width: 100%;\n      /* fixes overflow issue in Safari: https://bugs.webkit.org/show_bug.cgi?id=98538 */\n      z-index: 0;\n    "])),
    t.toggleBorderWidth, t.toggleBorderColor);







  },
  containerSmall: function containerSmall(t) {
    return (0, _Emotion.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.containerSizeMixin)(t.toggleBorderRadiusSmall));

  },
  containerMedium: function containerMedium(t) {
    return (0, _Emotion.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.containerSizeMixin)(t.toggleBorderRadiusMedium));

  },
  containerLarge: function containerLarge(t) {
    return (0, _Emotion.css)(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.containerSizeMixin)(t.toggleBorderRadiusLarge));

  },

  containerDisabled: function containerDisabled(t) {
    return (0, _Emotion.css)(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteralLoose2.default)(["\n      background: ", ";\n      box-shadow: inset 0 0 0 1px ", ";\n    "])),
    t.toggleBgDisabled,
    t.toggleBorderColorDisabled);

  },

  focused: function focused(t) {
    return (0, _Emotion.css)(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteralLoose2.default)(["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "])),

    t.toggleOutlineColorFocus,
    t.toggleOutlineWidth, t.toggleFocusShadowColor);

  },

  isWarning: function isWarning(t) {
    return (0, _Emotion.css)(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteralLoose2.default)(["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "])),

    t.toggleOutlineColorFocus,
    t.toggleOutlineWidth, t.toggleShadowColorWarning);

  },

  isError: function isError(t) {
    return (0, _Emotion.css)(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteralLoose2.default)(["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "])),

    t.toggleOutlineColorFocus,
    t.toggleOutlineWidth, t.toggleShadowColorError);

  },

  button: function button(t) {
    return (0, _Emotion.css)(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteralLoose2.default)(["\n      position: absolute;\n      left: 0;\n      top: 0;\n      background: ", ";\n      line-height: ", ";\n    "])),



    t.toggleBaseBg,
    t.toggleHeightSmall);

  },
  buttonSmall: function buttonSmall(t) {
    return (0, _Emotion.css)(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.buttonSizeMixin)(
      t.labGrotesqueBaselineCompensation,
      t.toggleFontSizeSmall,
      t.toggleHeightSmall,
      t.toggleWidthSmall,
      t.toggleBorderRadiusSmall,
      t.toggleButtonOffsetY
    ));

  },
  buttonMedium: function buttonMedium(t) {
    return (0, _Emotion.css)(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.buttonSizeMixin)(
      t.labGrotesqueBaselineCompensation,
      t.toggleFontSizeMedium,
      t.toggleHeightMedium,
      t.toggleWidthMedium,
      t.toggleBorderRadiusMedium,
      t.toggleButtonOffsetY
    ));

  },
  buttonLarge: function buttonLarge(t) {
    return (0, _Emotion.css)(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.buttonSizeMixin)(
      t.labGrotesqueBaselineCompensation,
      t.toggleFontSizeLarge,
      t.toggleHeightLarge,
      t.toggleWidthLarge,
      t.toggleBorderRadiusLarge,
      t.toggleButtonOffsetY
    ));

  },

  buttonRight: function buttonRight() {
    return (0, _Emotion.css)(_templateObject27 || (_templateObject27 = (0, _taggedTemplateLiteralLoose2.default)(["\n      right: 0;\n      left: auto;\n    "])));



  },

  disabled: function disabled() {
    return (0, _Emotion.css)(_templateObject28 || (_templateObject28 = (0, _taggedTemplateLiteralLoose2.default)(["\n      cursor: default;\n    "])));


  },

  rootLeft: function rootLeft() {
    return (0, _Emotion.css)(_templateObject29 || (_templateObject29 = (0, _taggedTemplateLiteralLoose2.default)(["\n      flex-direction: row-reverse;\n    "])));


  },

  caption: function caption(t) {
    return (0, _Emotion.css)(_templateObject30 || (_templateObject30 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", ";\n      padding: 0 0 0 ", ";\n    "])),
    t.toggleTextColor,
    t.toggleCaptionGap);

  },
  captionSmall: function captionSmall(t) {
    return (0, _Emotion.css)(_templateObject31 || (_templateObject31 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.captionSizeMixin)(t.toggleFontSizeSmall, t.toggleHeightSmall));

  },
  captionMedium: function captionMedium(t) {
    return (0, _Emotion.css)(_templateObject32 || (_templateObject32 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.captionSizeMixin)(t.toggleFontSizeMedium, t.toggleHeightMedium));

  },
  captionLarge: function captionLarge(t) {
    return (0, _Emotion.css)(_templateObject33 || (_templateObject33 = (0, _taggedTemplateLiteralLoose2.default)(["\n      ", ";\n    "])),
    (0, _Toggle.captionSizeMixin)(t.toggleFontSizeLarge, t.toggleHeightLarge));

  },

  disabledCaption: function disabledCaption(t) {
    return (0, _Emotion.css)(_templateObject34 || (_templateObject34 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", ";\n    "])),
    t.textColorDisabled);

  },

  captionLeft: function captionLeft(t) {
    return (0, _Emotion.css)(_templateObject35 || (_templateObject35 = (0, _taggedTemplateLiteralLoose2.default)(["\n      color: ", ";\n      padding: 0 ", " 0 0;\n    "])),
    t.toggleTextColor,
    t.toggleCaptionGap);

  }
});