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 } from '../../lib/theming/Emotion.js';
export var getStyles = memoizeGetStyles(function (_a) {
    var css = _a.css;
    return ({
        outer: function (t) {
            return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n      width: ", ";\n      height: ", ";\n      background-color: ", ";\n      position: ", ";\n      left: ", ";\n      top: ", ";\n      right: ", ";\n      bottom: ", ";\n      overflow: hidden;\n    "], ["\n      width: ", ";\n      height: ", ";\n      background-color: ", ";\n      position: ", ";\n      left: ", ";\n      top: ", ";\n      right: ", ";\n      bottom: ", ";\n      overflow: hidden;\n    "])), t.globalLoaderWidth, t.globalLoaderHeight, t.globalLoaderBackgroundColor, t.globalLoaderPosition, t.globalLoaderLeft, t.globalLoaderTop, t.globalLoaderRight, t.globalLoaderBottom);
        },
        inner: function (t) {
            return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n      background-color: ", ";\n      width: 0;\n      height: ", ";\n      position: absolute;\n      left: 0;\n      overflow: hidden;\n    "], ["\n      background-color: ", ";\n      width: 0;\n      height: ", ";\n      position: absolute;\n      left: 0;\n      overflow: hidden;\n    "])), t.globalLoaderColor, t.globalLoaderHeight);
        },
        standardWithoutAnimation: function () {
            return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n      left: 0;\n      width: 90%;\n    "], ["\n      left: 0;\n      width: 90%;\n    "])));
        },
        successWithoutAnimation: function () {
            return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n      left: 0;\n      width: 100%;\n    "], ["\n      left: 0;\n      width: 100%;\n    "])));
        },
        errorWithoutAnimation: function () {
            return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n      left: 40%;\n      width: 20%;\n    "], ["\n      left: 40%;\n      width: 20%;\n    "])));
        },
    });
});
var moveToRightAnimation = function (_a) {
    var keyframes = _a.keyframes;
    return keyframes(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n  0% {\n    left: 0;\n    width: 100%;\n  }\n  50% {\n    left: 50%;\n    width: 50%;\n  }\n  100% {\n    left: 99%;\n    width: 1%\n  }\n"], ["\n  0% {\n    left: 0;\n    width: 100%;\n  }\n  50% {\n    left: 50%;\n    width: 50%;\n  }\n  100% {\n    left: 99%;\n    width: 1%\n  }\n"])));
};
var spinnerAnimation = function (_a) {
    var keyframes = _a.keyframes;
    return keyframes(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n  0% {\n    transform: translateX(50%) scaleX(.005);\n    animation-timing-function: cubic-bezier(.895,.03,.685,.22);\n  }\n  50% {\n    transform: translateX(0) scaleX(.35);\n    animation-timing-function: cubic-bezier(.165,.84,.44,1);\n  }\n  100% {\n    transform: translateX(-50%) scaleX(.005);\n  }\n"], ["\n  0% {\n    transform: translateX(50%) scaleX(.005);\n    animation-timing-function: cubic-bezier(.895,.03,.685,.22);\n  }\n  50% {\n    transform: translateX(0) scaleX(.35);\n    animation-timing-function: cubic-bezier(.165,.84,.44,1);\n  }\n  100% {\n    transform: translateX(-50%) scaleX(.005);\n  }\n"])));
};
var linearProgressAnimation = function (_a) {
    var keyframes = _a.keyframes;
    return keyframes(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n  from { width: 0; }\n  to { width: 80% }\n"], ["\n  from { width: 0; }\n  to { width: 80% }\n"])));
};
var slowProgressAnimation = function (_a) {
    var keyframes = _a.keyframes;
    return keyframes(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n  from { width: 80%; }\n  to { width: 90% }\n"], ["\n  from { width: 80%; }\n  to { width: 90% }\n"])));
};
export var getAnimations = function (emotion) { return ({
    successAnimation: function (delayBeforeHide, width, left) {
        return emotion.css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n      animation: successAnimation;\n      animation-duration: ", "ms;\n      @keyframes successAnimation {\n        0% {\n          width: ", "px;\n          left: ", "px;\n          opacity: 1;\n        }\n        20% {\n          width: 100%;\n          left: 0;\n          opacity: 1;\n        }\n        80% {\n          width: 100%;\n          left: 0;\n          opacity: 1;\n        }\n        100% {\n          width: 100%;\n          opacity: 0;\n        }\n      }\n    "], ["\n      animation: successAnimation;\n      animation-duration: ", "ms;\n      @keyframes successAnimation {\n        0% {\n          width: ", "px;\n          left: ", "px;\n          opacity: 1;\n        }\n        20% {\n          width: 100%;\n          left: 0;\n          opacity: 1;\n        }\n        80% {\n          width: 100%;\n          left: 0;\n          opacity: 1;\n        }\n        100% {\n          width: 100%;\n          opacity: 0;\n        }\n      }\n    "])), delayBeforeHide, width, left);
    },
    errorAnimation: function (t) {
        var transitionDuration = parseInt(t.globalLoaderTransitionToSpinnerDuration);
        var spinnerAnimationDuration = parseInt(t.globalLoaderSpinnerAnimationDuration);
        return emotion.css(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n      left: 0;\n      width: 100%;\n      animation:\n        ", " ", "ms linear,\n        ", "ms ", " ", "ms infinite alternate;\n    "], ["\n      left: 0;\n      width: 100%;\n      animation:\n        ", " ", "ms linear,\n        ", "ms ", " ", "ms infinite alternate;\n    "])), moveToRightAnimation(emotion), transitionDuration, spinnerAnimationDuration, spinnerAnimation(emotion), transitionDuration);
    },
    standardAnimation: function (t, expectedTime) {
        var slowProgressAnimationTime = parseInt(t.globalLoaderSlowAnimationDuration);
        return emotion.css(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n      width: 90%;\n      animation:\n        ", " ", "ms cubic-bezier(0, 0.4, 0.4, 1),\n        ", "ms ", " ", "ms linear;\n    "], ["\n      width: 90%;\n      animation:\n        ", " ", "ms cubic-bezier(0, 0.4, 0.4, 1),\n        ", "ms ", " ", "ms linear;\n    "])), linearProgressAnimation(emotion), expectedTime, slowProgressAnimationTime, slowProgressAnimation(emotion), expectedTime);
    },
    acceptAnimation: function (t, startWidth, expectedTime, width, left) {
        var transitionTime = parseInt(t.globalLoaderTransitionFromSpinnerDuration);
        var slowProgressAnimationTime = parseInt(t.globalLoaderSlowAnimationDuration);
        return emotion.css(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n      width: 90%;\n      animation:\n        transitionAnimation ", "ms linear,\n        ", "ms acceptAnimation ", "ms cubic-bezier(0, 0.4, 0.4, 1),\n        ", "ms ", " ", "ms linear;\n      @keyframes transitionAnimation {\n        from {\n          width: ", "px;\n          left: ", "px;\n        }\n        to {\n          width: ", "px;\n          left: 0;\n        }\n      }\n      @keyframes acceptAnimation {\n        from {\n          width: ", "px;\n        }\n        to {\n          width: 80%;\n        }\n      }\n    "], ["\n      width: 90%;\n      animation:\n        transitionAnimation ", "ms linear,\n        ", "ms acceptAnimation ", "ms cubic-bezier(0, 0.4, 0.4, 1),\n        ", "ms ", " ", "ms linear;\n      @keyframes transitionAnimation {\n        from {\n          width: ", "px;\n          left: ", "px;\n        }\n        to {\n          width: ", "px;\n          left: 0;\n        }\n      }\n      @keyframes acceptAnimation {\n        from {\n          width: ", "px;\n        }\n        to {\n          width: 80%;\n        }\n      }\n    "])), transitionTime, expectedTime, transitionTime, slowProgressAnimationTime, slowProgressAnimation(emotion), expectedTime + transitionTime, width, left, startWidth, startWidth);
    },
    slowAcceptAnimation: function (t, startWidth, width, left) {
        var transitionTime = parseInt(t.globalLoaderTransitionFromSpinnerDuration);
        var slowProgressAnimationTime = parseInt(t.globalLoaderSlowAnimationDuration);
        return emotion.css(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n      width: 90%;\n      animation:\n        transitionAnimation ", "ms linear,\n        ", "ms acceptAnimation ", "ms linear;\n      @keyframes transitionAnimation {\n        from {\n          width: ", "px;\n          left: ", "px;\n        }\n        to {\n          width: ", "px;\n          left: 0;\n        }\n      }\n      @keyframes acceptAnimation {\n        from {\n          width: ", "px;\n        }\n        to {\n          width: 90%;\n        }\n      }\n    "], ["\n      width: 90%;\n      animation:\n        transitionAnimation ", "ms linear,\n        ", "ms acceptAnimation ", "ms linear;\n      @keyframes transitionAnimation {\n        from {\n          width: ", "px;\n          left: ", "px;\n        }\n        to {\n          width: ", "px;\n          left: 0;\n        }\n      }\n      @keyframes acceptAnimation {\n        from {\n          width: ", "px;\n        }\n        to {\n          width: 90%;\n        }\n      }\n    "])), transitionTime, slowProgressAnimationTime, transitionTime, width, left, startWidth, startWidth);
    },
    acceptWithoutAnimation: function (startWidth) {
        return emotion.css(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n      width: ", "px;\n    "], ["\n      width: ", "px;\n    "])), startWidth);
    },
}); };
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;
//# sourceMappingURL=GlobalLoaderView.styles.js.map