/** @license MIT | @cube-dev/ui-kit v0.142.7 | Cube Dev Team */
import { _LayoutContainer } from "./LayoutContainer.js";
import { tasty } from "@tenphi/tasty";
import { forwardRef } from "react";
import { jsx, jsxs } from "react/jsx-runtime";

//#region src/components/content/Layout/LayoutCenter.tsx
const CenterElement = tasty(_LayoutContainer, {
	qa: "LayoutCenter",
	styles: {
		placeItems: "stretch",
		placeContent: "stretch",
		Inner: {
			textAlign: "center",
			placeItems: "center",
			placeContent: "center"
		}
	}
});
const GoldenRatioSpacerElement = tasty({
	"aria-hidden": "true",
	qa: "LayoutCenterGoldenRatioSpacer",
	styles: {
		flexGrow: {
			"": .382,
			"position=bottom": .618
		},
		flexShrink: 1,
		flexBasis: 0,
		minHeight: 0,
		pointerEvents: "none"
	}
});
function LayoutCenter(props, ref) {
	const { children, isGoldenRatio, ...otherProps } = props;
	return /* @__PURE__ */ jsxs(CenterElement, {
		...otherProps,
		ref,
		children: [
			isGoldenRatio && /* @__PURE__ */ jsx(GoldenRatioSpacerElement, { mods: { position: "top" } }),
			children,
			isGoldenRatio && /* @__PURE__ */ jsx(GoldenRatioSpacerElement, { mods: { position: "bottom" } })
		]
	});
}
const _LayoutCenter = forwardRef(LayoutCenter);
_LayoutCenter.displayName = "Layout.Center";

//#endregion
export { _LayoutCenter };
//# sourceMappingURL=LayoutCenter.js.map