import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import vui from "../core/vui.js";
import List from "../list/list.js";
import { useHeaderContext } from "./context.js";
import HeaderLinkItem from "./headerLinkItem.js";
import { jsx } from "react/jsx-runtime";

//#region src/header/headerMainLinks.tsx
/** List of Header Links. */
const HeaderMainLinks = vui((props, ref) => {
	const { children, className, links, ...rest } = props;
	const { isMobile } = useHeaderContext() ?? {};
	const styles = useStyleConfig("Header", useHeaderContext());
	const screenStyles = isMobile ? {
		flexDirection: "column",
		mb: 1
	} : { h: "100%" };
	return /* @__PURE__ */ jsx(List, {
		className: cs("vui-headerMainLinks", className),
		display: "flex",
		ref,
		...styles.mainLinks,
		...screenStyles,
		...rest,
		children: children ?? links?.map((link, index) => /* @__PURE__ */ jsx(HeaderLinkItem, { ...link }, index))
	});
});
HeaderMainLinks.displayName = "HeaderMainLinks";

//#endregion
export { HeaderMainLinks as default };
globalThis.__vuiVersion__ = "4.0.1"
//# sourceMappingURL=headerMainLinks.js.map