"use client";
const require_keys = require("../../../../core/utils/keys/keys.cjs");
const require_rem = require("../../../../core/utils/units-converters/rem.cjs");
const require_get_base_size = require("../get-base-size/get-base-size.cjs");
const require_is_primitive_size = require("../is-primitive-size/is-primitive-size.cjs");
const require_is_responsive_size = require("../is-responsive-size/is-responsive-size.cjs");
//#region packages/@mantine/core/src/components/AppShell/AppShellMediaStyles/assign-footer-variables/assign-footer-variables.ts
function assignFooterVariables({ baseStyles, minMediaStyles, footer, mode }) {
	const footerHeight = footer?.height;
	const collapsedFooterTransform = "translateY(var(--app-shell-footer-height))";
	const shouldOffset = mode === "static" ? true : footer?.offset ?? true;
	if (mode === "static" && footer) {
		baseStyles["--app-shell-footer-position"] = "sticky";
		baseStyles["--app-shell-footer-grid-column"] = "1 / -1";
		baseStyles["--app-shell-footer-grid-row"] = "3";
	}
	if (require_is_primitive_size.isPrimitiveSize(footerHeight)) {
		const baseSize = require_rem.rem(require_get_base_size.getBaseSize(footerHeight));
		baseStyles["--app-shell-footer-height"] = baseSize;
		if (shouldOffset) baseStyles["--app-shell-footer-offset"] = baseSize;
	}
	if (require_is_responsive_size.isResponsiveSize(footerHeight)) {
		if (typeof footerHeight.base !== "undefined") {
			baseStyles["--app-shell-footer-height"] = require_rem.rem(footerHeight.base);
			if (shouldOffset) baseStyles["--app-shell-footer-offset"] = require_rem.rem(footerHeight.base);
		}
		require_keys.keys(footerHeight).forEach((key) => {
			if (key !== "base") {
				minMediaStyles[key] = minMediaStyles[key] || {};
				minMediaStyles[key]["--app-shell-footer-height"] = require_rem.rem(footerHeight[key]);
				if (shouldOffset) minMediaStyles[key]["--app-shell-footer-offset"] = require_rem.rem(footerHeight[key]);
			}
		});
	}
	if (footer?.collapsed) {
		baseStyles["--app-shell-footer-transform"] = collapsedFooterTransform;
		if (mode === "fixed") baseStyles["--app-shell-footer-offset"] = "0px !important";
	}
}
//#endregion
exports.assignFooterVariables = assignFooterVariables;

//# sourceMappingURL=assign-footer-variables.cjs.map