import { createStyles } from "../../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.mjs";
import { em } from "../../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.mjs";
import { px } from "../../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.mjs";
function getBreakpointValue(theme, breakpoint) {
  return breakpoint in theme.breakpoints && typeof breakpoint !== "number" ? px(theme.breakpoints[breakpoint]) : px(breakpoint);
}
const useStyles = 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: ${em(getBreakpointValue(theme, largerThan))}) and (max-width: ${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 };
});
export {
  useStyles as default
};
