"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const keys = require("../../../../core/utils/keys/keys.cjs");
const rem = require("../../../../core/utils/units-converters/rem.cjs");
require("react");
require("react/jsx-runtime");
require("clsx");
const getBaseSize = require("../get-base-size/get-base-size.cjs");
const isPrimitiveSize = require("../is-primitive-size/is-primitive-size.cjs");
const isResponsiveSize = require("../is-responsive-size/is-responsive-size.cjs");
function assignFooterVariables({
  baseStyles,
  minMediaStyles,
  footer
}) {
  const footerHeight = footer == null ? void 0 : footer.height;
  const collapsedFooterTransform = "translateY(var(--app-shell-footer-height))";
  const shouldOffset = (footer == null ? void 0 : footer.offset) ?? true;
  if (isPrimitiveSize.isPrimitiveSize(footerHeight)) {
    const baseSize = rem.rem(getBaseSize.getBaseSize(footerHeight));
    baseStyles["--app-shell-footer-height"] = baseSize;
    if (shouldOffset) {
      baseStyles["--app-shell-footer-offset"] = baseSize;
    }
  }
  if (isResponsiveSize.isResponsiveSize(footerHeight)) {
    if (typeof footerHeight.base !== "undefined") {
      baseStyles["--app-shell-footer-height"] = rem.rem(footerHeight.base);
      if (shouldOffset) {
        baseStyles["--app-shell-footer-offset"] = rem.rem(footerHeight.base);
      }
    }
    keys.keys(footerHeight).forEach((key) => {
      if (key !== "base") {
        minMediaStyles[key] = minMediaStyles[key] || {};
        minMediaStyles[key]["--app-shell-footer-height"] = rem.rem(footerHeight[key]);
        if (shouldOffset) {
          minMediaStyles[key]["--app-shell-footer-offset"] = rem.rem(footerHeight[key]);
        }
      }
    });
  }
  if (footer == null ? void 0 : footer.collapsed) {
    baseStyles["--app-shell-footer-transform"] = collapsedFooterTransform;
    baseStyles["--app-shell-footer-offset"] = "0px !important";
  }
}
exports.assignFooterVariables = assignFooterVariables;
