"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormLayoutGroup = exports.FormLayout = void 0;
const react_1 = __importDefault(require("react"));
const BlockStack_1 = require("../BlockStack");
const Layout_1 = require("../Layout");
const Theme_1 = require("../Theme");
function FormLayout({ children }) {
    const { formLayout: { spacing }, } = Theme_1.useThemeConfiguration();
    const normalizedSpacing = spacing === 'base' ? undefined : spacing;
    return <BlockStack_1.BlockStack spacing={normalizedSpacing}>{children}</BlockStack_1.BlockStack>;
}
exports.FormLayout = FormLayout;
function FormLayoutGroup({ children, }) {
    const { formLayout: { spacing = 'base' }, } = Theme_1.useThemeConfiguration();
    const normalizedSpacing = spacing === 'none' ? undefined : spacing;
    return (<Layout_1.Layout sizes={{ base: [1, 1, 1], small: ['fill', 'fill', 'fill'] }} spacing={normalizedSpacing}>
      {children}
    </Layout_1.Layout>);
}
exports.FormLayoutGroup = FormLayoutGroup;
