var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
import { memoizeGetStyles, prefix } from '../../lib/theming/Emotion.js';
import { buttonSizeMixin, captionSizeMixin, containerSizeMixin, handleMixin, inputSizeMixin, toggleSizeMixin, } from './Toggle.mixins.js';
export var globalClasses = prefix('toggle')({
    handle: 'handle',
    container: 'container',
    disabled: 'disabled',
    containerDisabled: 'container-disabled',
    containerLoading: 'container-loading',
    background: 'background',
});
export var getStyles = memoizeGetStyles(function (_a) {
    var css = _a.css;
    return ({
        root: function (t) {
            return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\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 (t) {
            return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), toggleSizeMixin(t.toggleFontSizeSmall, t.toggleHeightSmall, t.toggleWidthSmall));
        },
        rootMedium: function (t) {
            return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), toggleSizeMixin(t.toggleFontSizeMedium, t.toggleHeightMedium, t.toggleWidthMedium));
        },
        rootLarge: function (t) {
            return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), toggleSizeMixin(t.toggleFontSizeLarge, t.toggleHeightLarge, t.toggleWidthLarge));
        },
        disableAnimation: function () {
            return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n      &,\n      * {\n        transition: none !important;\n      }\n    "], ["\n      &,\n      * {\n        transition: none !important;\n      }\n    "])));
        },
        handle: function (t) {
            return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n      bottom: ", ";\n      left: ", ";\n      position: absolute;\n      top: ", ";\n    "], ["\n      bottom: ", ";\n      left: ", ";\n      position: absolute;\n      top: ", ";\n    "])), t.toggleBorderWidth, t.toggleHandleLeft, t.toggleHandleTop);
        },
        handleSmall: function (t) {
            return css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), handleMixin(t.toggleHandleSizeSmall, t.toggleHandleBorderRadiusSmall));
        },
        handleMedium: function (t) {
            return css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), handleMixin(t.toggleHandleSizeMedium, t.toggleHandleBorderRadiusMedium));
        },
        handleLarge: function (t) {
            return css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), handleMixin(t.toggleHandleSizeLarge, t.toggleHandleBorderRadiusLarge));
        },
        handleDisabled: function (t) {
            return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n      background: ", " !important; // override root hover/active styles\n    "], ["\n      background: ", " !important; // override root hover/active styles\n    "])), t.toggleDisabledHandleBg);
        },
        input: function (t) {
            return css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\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    "], ["\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 (t) {
            return css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), inputSizeMixin(t.toggleHeightSmall, t.toggleWidthSmall));
        },
        inputMedium: function (t) {
            return css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), inputSizeMixin(t.toggleHeightMedium, t.toggleWidthMedium));
        },
        inputLarge: function (t) {
            return css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), inputSizeMixin(t.toggleHeightLarge, t.toggleWidthLarge));
        },
        container: function (t) {
            return css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\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    "], ["\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 (t) {
            return css(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), containerSizeMixin(t.toggleBorderRadiusSmall));
        },
        containerMedium: function (t) {
            return css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), containerSizeMixin(t.toggleBorderRadiusMedium));
        },
        containerLarge: function (t) {
            return css(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), containerSizeMixin(t.toggleBorderRadiusLarge));
        },
        containerDisabled: function (t) {
            return css(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n      background: ", ";\n      box-shadow: inset 0 0 0 1px ", ";\n    "], ["\n      background: ", ";\n      box-shadow: inset 0 0 0 1px ", ";\n    "])), t.toggleBgDisabled, t.toggleBorderColorDisabled);
        },
        focused: function (t) {
            return css(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "], ["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "])), t.toggleOutlineColorFocus, t.toggleOutlineWidth, t.toggleFocusShadowColor);
        },
        isWarning: function (t) {
            return css(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "], ["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "])), t.toggleOutlineColorFocus, t.toggleOutlineWidth, t.toggleShadowColorWarning);
        },
        isError: function (t) {
            return css(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "], ["\n      box-shadow:\n        0 0 0 1px ", ",\n        0 0 0 ", " ", ";\n    "])), t.toggleOutlineColorFocus, t.toggleOutlineWidth, t.toggleShadowColorError);
        },
        button: function (t) {
            return css(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n      position: absolute;\n      left: 0;\n      top: 0;\n      background: ", ";\n      line-height: ", ";\n    "], ["\n      position: absolute;\n      left: 0;\n      top: 0;\n      background: ", ";\n      line-height: ", ";\n    "])), t.toggleBaseBg, t.toggleHeightSmall);
        },
        buttonSmall: function (t) {
            return css(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), buttonSizeMixin(t.labGrotesqueBaselineCompensation, t.toggleFontSizeSmall, t.toggleHeightSmall, t.toggleWidthSmall, t.toggleBorderRadiusSmall, t.toggleButtonOffsetY));
        },
        buttonMedium: function (t) {
            return css(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), buttonSizeMixin(t.labGrotesqueBaselineCompensation, t.toggleFontSizeMedium, t.toggleHeightMedium, t.toggleWidthMedium, t.toggleBorderRadiusMedium, t.toggleButtonOffsetY));
        },
        buttonLarge: function (t) {
            return css(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), buttonSizeMixin(t.labGrotesqueBaselineCompensation, t.toggleFontSizeLarge, t.toggleHeightLarge, t.toggleWidthLarge, t.toggleBorderRadiusLarge, t.toggleButtonOffsetY));
        },
        buttonRight: function () {
            return css(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n      right: 0;\n      left: auto;\n    "], ["\n      right: 0;\n      left: auto;\n    "])));
        },
        disabled: function () {
            return css(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n      cursor: default;\n    "], ["\n      cursor: default;\n    "])));
        },
        rootLeft: function () {
            return css(templateObject_29 || (templateObject_29 = __makeTemplateObject(["\n      flex-direction: row-reverse;\n    "], ["\n      flex-direction: row-reverse;\n    "])));
        },
        caption: function (t) {
            return css(templateObject_30 || (templateObject_30 = __makeTemplateObject(["\n      color: ", ";\n      padding: 0 0 0 ", ";\n    "], ["\n      color: ", ";\n      padding: 0 0 0 ", ";\n    "])), t.toggleTextColor, t.toggleCaptionGap);
        },
        captionSmall: function (t) {
            return css(templateObject_31 || (templateObject_31 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), captionSizeMixin(t.toggleFontSizeSmall, t.toggleHeightSmall));
        },
        captionMedium: function (t) {
            return css(templateObject_32 || (templateObject_32 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), captionSizeMixin(t.toggleFontSizeMedium, t.toggleHeightMedium));
        },
        captionLarge: function (t) {
            return css(templateObject_33 || (templateObject_33 = __makeTemplateObject(["\n      ", ";\n    "], ["\n      ", ";\n    "])), captionSizeMixin(t.toggleFontSizeLarge, t.toggleHeightLarge));
        },
        disabledCaption: function (t) {
            return css(templateObject_34 || (templateObject_34 = __makeTemplateObject(["\n      color: ", ";\n    "], ["\n      color: ", ";\n    "])), t.textColorDisabled);
        },
        captionLeft: function (t) {
            return css(templateObject_35 || (templateObject_35 = __makeTemplateObject(["\n      color: ", ";\n      padding: 0 ", " 0 0;\n    "], ["\n      color: ", ";\n      padding: 0 ", " 0 0;\n    "])), t.toggleTextColor, t.toggleCaptionGap);
        },
    });
});
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27, templateObject_28, templateObject_29, templateObject_30, templateObject_31, templateObject_32, templateObject_33, templateObject_34, templateObject_35;
//# sourceMappingURL=Toggle.styles.js.map