"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const createStyles = require("../../node_modules/.pnpm/@mantine_emotion@7.15.2_@emotion_cache@11.14.0_@emotion_react@11.14.0_@types_react@18.3.18_re_vflj3eioazr6wkrxpatinf66nq/node_modules/@mantine/emotion/esm/create-styles.cjs");
const rem = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/utils/units-converters/rem.cjs");
const px = require("../../node_modules/.pnpm/@mantine_core@7.15.2_patch_hash_jclkxeaefn6uz54h34k3r3yjsq_@mantine_hooks@7.15.2_react@18.3.1_szqfuioo5damkjdixckhzmwycq/node_modules/@mantine/core/esm/core/utils/units-converters/px.cjs");
function getBreakpointValue(theme, breakpoint) {
  return breakpoint in theme.breakpoints && typeof breakpoint !== "number" ? px.px(theme.breakpoints[breakpoint]) : px.px(breakpoint);
}
const useStyles = createStyles.createStyles((theme, { smallerThan, largerThan, query, styles }, u) => {
  const media = {};
  const _styles = typeof styles === "function" ? styles(theme) : styles;
  if (largerThan !== void 0 && smallerThan !== void 0) {
    media[`@media (min-width: ${rem.em(getBreakpointValue(theme, largerThan))}) and (max-width: ${rem.em(
      getBreakpointValue(theme, smallerThan) - 0.1
    )})`] = _styles;
  } else {
    if (largerThan !== void 0) {
      media[u.largerThan(largerThan)] = _styles;
    }
    if (smallerThan !== void 0) {
      media[u.smallerThan(smallerThan)] = _styles;
    }
  }
  if (query) {
    media[`@media ${query}`] = _styles;
  }
  return { media };
});
exports.default = useStyles;
