"use strict";

import { View } from "react-native";
import { useIOFontDynamicScale } from "../../utils/accessibility";
import { jsx as _jsx } from "react/jsx-runtime";
/**
Horizontal Stack component
@param {IOSpacer} space
 */

const Stack = ({
  space = 0,
  style,
  orientation = "vertical",
  allowScaleSpacing,
  children,
  ...props
}) => {
  const {
    dynamicFontScale,
    spacingScaleMultiplier
  } = useIOFontDynamicScale();
  return /*#__PURE__*/_jsx(View, {
    ...props,
    style: {
      display: "flex",
      flexDirection: orientation === "horizontal" ? "row" : "column",
      gap: allowScaleSpacing && space !== 0 ? space * dynamicFontScale * spacingScaleMultiplier : space,
      ...style
    },
    children: children
  });
};
export const HStack = ({
  children,
  ...props
}) => /*#__PURE__*/_jsx(Stack, {
  orientation: "horizontal",
  ...props,
  children: children
});

/**
Vertical Stack component
@param {IOSpacer} space
 */

export const VStack = ({
  children,
  ...props
}) => /*#__PURE__*/_jsx(Stack, {
  orientation: "vertical",
  ...props,
  children: children
});
//# sourceMappingURL=Stack.js.map