import { isJsx } from "../utils/assertion.js";
import { cs } from "../utils/styles.js";
import "../utils/index.js";
import { useStyleConfig } from "../core/theme.js";
import { v } from "../core/styled.js";
import { vui } from "../core/vui.js";
import box_default from "../box/box.js";
import "../box/index.js";
import "../core/index.js";
import { useFooterContext } from "./context.js";
import footerHeading_default from "./footerHeading.js";
import footerLink_default 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_default, {
		className: cs("vui-footerSection", className),
		column: true,
		ref,
		...styles.section,
		...rest,
		children: [isJsx(heading) ? heading : /* @__PURE__ */ jsx(footerHeading_default, { text: heading }), children ?? (isJsx(links) ? links : /* @__PURE__ */ jsx(v.ul, { children: links?.map(({ text, url }, index) => /* @__PURE__ */ jsx(v.li, { children: /* @__PURE__ */ jsx(footerLink_default, {
			href: url,
			text
		}) }, index)) }))]
	});
});
FooterSection.displayName = "FooterSection";
var footerSection_default = FooterSection;

//#endregion
export { FooterSection, footerSection_default as default };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=footerSection.js.map