"use client";
import { useProps } from "../../../core/MantineProvider/use-props/use-props.mjs";
import { factory } from "../../../core/factory/factory.mjs";
import { Box } from "../../../core/Box/Box.mjs";
import { useAppShellContext } from "../AppShell.context.mjs";
import AppShell_module_default from "../AppShell.module.mjs";
import { RemoveScroll } from "react-remove-scroll";
import cx from "clsx";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/AppShell/AppShellHeader/AppShellHeader.tsx
const AppShellHeader = factory((_props) => {
	const { classNames, className, style, styles, unstyled, vars, withBorder, zIndex, mod, ...others } = useProps("AppShellHeader", null, _props);
	const ctx = useAppShellContext();
	if (ctx.disabled) return null;
	return /* @__PURE__ */ jsx(Box, {
		component: "header",
		mod: [{ "with-border": withBorder ?? ctx.withBorder }, mod],
		...ctx.getStyles("header", {
			className: cx({ [RemoveScroll.classNames.zeroRight]: ctx.offsetScrollbars }, className),
			classNames,
			styles,
			style
		}),
		...others,
		__vars: { "--app-shell-header-z-index": (zIndex ?? ctx.zIndex)?.toString() }
	});
});
AppShellHeader.classes = AppShell_module_default;
AppShellHeader.displayName = "@mantine/core/AppShellHeader";
//#endregion
export { AppShellHeader };

//# sourceMappingURL=AppShellHeader.mjs.map