"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.VStack = exports.HStack = void 0;
var _reactNative = require("react-native");
var _accessibility = require("../../utils/accessibility");
var _jsxRuntime = require("react/jsx-runtime");
/**
Horizontal Stack component
@param {IOSpacer} space
 */

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

/**
Vertical Stack component
@param {IOSpacer} space
 */
exports.HStack = HStack;
const VStack = ({
  children,
  ...props
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Stack, {
  orientation: "vertical",
  ...props,
  children: children
});
exports.VStack = VStack;
//# sourceMappingURL=Stack.js.map