/** @license MIT | @cube-dev/ui-kit v0.135.1 | Cube Dev Team */
import { extractStyles } from "../../utils/styles.js";
import { CONTAINER_STYLES, filterBaseProps, tasty } from "@tenphi/tasty";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";

//#region src/components/layout/Space.tsx
const SpaceElement = tasty({ styles: {
	display: "flex",
	gap: true,
	flow: {
		"": "row",
		vertical: "column"
	},
	placeItems: {
		"": "center stretch",
		vertical: "stretch"
	}
} });
const Space = forwardRef(function Space(props, ref) {
	const { mods, direction, ...otherProps } = props;
	const styles = extractStyles(otherProps, CONTAINER_STYLES);
	return /* @__PURE__ */ jsx(SpaceElement, {
		...filterBaseProps(otherProps, { eventProps: true }),
		ref,
		mods: {
			vertical: direction === "vertical" || otherProps.flow === "column" || styles.flow === "column",
			...mods
		},
		styles
	});
});

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