import { jsx } from "react/jsx-runtime";
import clsx from "clsx";
import ReactRemoveScroll from "../../../../../../../../react-remove-scroll@2.6.0_@types_react@18.3.18_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.mjs";
import "react";
import { useProps } from "../../../core/MantineProvider/use-props/use-props.mjs";
import { Box } from "../../../core/Box/Box.mjs";
import { factory } from "../../../core/factory/factory.mjs";
import { useAppShellContext } from "../AppShell.context.mjs";
import classes from "../AppShell.module.css.mjs";
const defaultProps = {};
const AppShellHeader = factory((_props, ref) => {
  var _a;
  const props = useProps("AppShellHeader", defaultProps, _props);
  const {
    classNames,
    className,
    style,
    styles,
    unstyled,
    vars,
    withBorder,
    zIndex,
    mod,
    ...others
  } = props;
  const ctx = useAppShellContext();
  if (ctx.disabled) {
    return null;
  }
  return /* @__PURE__ */ jsx(
    Box,
    {
      component: "header",
      ref,
      mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
      ...ctx.getStyles("header", {
        className: clsx({ [ReactRemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
        classNames,
        styles,
        style
      }),
      ...others,
      __vars: { "--app-shell-header-z-index": (_a = zIndex ?? ctx.zIndex) == null ? void 0 : _a.toString() }
    }
  );
});
AppShellHeader.classes = classes;
AppShellHeader.displayName = "@mantine/core/AppShellHeader";
export {
  AppShellHeader
};
