/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-a795c5b | Cube Dev Team */
import { extractStyles } from "../../tasty/utils/styles.js";
import { CONTAINER_STYLES } from "../../tasty/styles/list.js";
import { tasty } from "../../tasty/tasty.js";
import { filterBaseProps } from "../../tasty/utils/filter-base-props.js";
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