import { isJsx } from "../utils/assertion.js";
import { cs } from "../utils/styles.js";
import { useStyleConfig } from "../core/theme.js";
import { v } from "../core/styled.js";
import vui from "../core/vui.js";
import Box from "../box/box.js";
import { useFooterContext } from "./context.js";
import FooterHeading from "./footerHeading.js";
import FooterLink from "./footerLink.js";
import { jsx, jsxs } from "react/jsx-runtime";

//#region src/footer/footerSection.tsx
/** Section includes a heading and a set of links. */
const FooterSection = vui((props, ref) => {
	const { children, className, heading, links, ...rest } = props;
	const styles = useStyleConfig("Footer", useFooterContext());
	return /* @__PURE__ */ jsxs(Box, {
		className: cs("vui-footerSection", className),
		column: true,
		ref,
		...styles.section,
		...rest,
		children: [isJsx(heading) ? heading : /* @__PURE__ */ jsx(FooterHeading, { text: heading }), children ?? (isJsx(links) ? links : /* @__PURE__ */ jsx(v.ul, { children: links?.map(({ text, url, target }, index) => /* @__PURE__ */ jsx(v.li, { children: /* @__PURE__ */ jsx(FooterLink, {
			href: url,
			text,
			target
		}) }, index)) }))]
	});
});
FooterSection.displayName = "FooterSection";

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