/* eslint-disable no-irregular-whitespace */
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import { createMakeStyles } from "tss-react/compat";
import { createIcon } from "onyxia-ui/Icon";
import { createIconButton } from "onyxia-ui/IconButton";
import { createButton } from "onyxia-ui/Button";
import Brightness4Icon from "@mui/icons-material/Brightness4";
import Brightness7Icon from "@mui/icons-material/Brightness7";
import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
import DehazeIcon from "@mui/icons-material/Dehaze";
import Brightness1RoundedIcon from "@mui/icons-material/Brightness1Rounded";
import { createText } from "onyxia-ui/Text";
import { breakpointsValues as defaultBreakpointsValues } from "onyxia-ui";
import { useStyles } from "onyxia-ui/lib/ThemeProvider";
export function useTheme() {
    var theme = useStyles().theme;
    return __assign(__assign({}, theme), { "paddingRightLeft": theme.spacing((function () {
            if (theme.windowInnerWidth >= breakpointsValues["lg"]) {
                return 7;
            }
            if (theme.windowInnerWidth >= breakpointsValues["sm"]) {
                return 6;
            }
            return 4;
        })()), "customShadow": "2px 3px 35px -1px rgba(0,0,0,0.45)", "borderRadius": theme.spacing(1) });
}
export var makeStyles = createMakeStyles({ useTheme: useTheme }).makeStyles;
export var Text = createText({ useTheme: useTheme }).Text;
export var Icon = createIcon({
    "brightness4": Brightness4Icon,
    "brightness7": Brightness7Icon,
    "arrowBackIos": ArrowBackIosIcon,
    "arrowForwardIos": ArrowForwardIosIcon,
    "dehaze": DehazeIcon,
    "brightness1Rounded": Brightness1RoundedIcon,
}).Icon;
export var IconButton = createIconButton({ Icon: Icon }).IconButton;
export var Button = createButton({ Icon: Icon }).Button;
export var breakpointsValues = __assign(__assign({}, defaultBreakpointsValues), { "lg+": 1440 });
export var splashScreen = {
    "Logo": function () { return null; },
    "minimumDisplayDuration": 0,
};
export var useIllustrationStyles = makeStyles()(function (theme, _a) {
    var aspectRatio = _a.aspectRatio, illustrationZoomFactor = _a.illustrationZoomFactor, type = _a.type;
    return ({
        "root": __assign({}, (function () {
            if (type === "custom component" || type === undefined) {
                return undefined;
            }
            if (isNaN(aspectRatio)) {
                return {
                    "opacity": 0,
                };
            }
            var value = (function () {
                if (aspectRatio <= 1) {
                    return 600 * aspectRatio;
                }
                return 600;
            })() * (illustrationZoomFactor !== null && illustrationZoomFactor !== void 0 ? illustrationZoomFactor : 1);
            return {
                "maxWidth": value,
                "minWidth": theme.windowInnerWidth < breakpointsValues.md
                    ? undefined
                    : value,
                "alignSelf": theme.windowInnerWidth < breakpointsValues.md
                    ? "center"
                    : undefined,
            };
        })()),
    });
});
//# sourceMappingURL=theme.js.map