import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { createComponent } from '@meta-ui/core';
import { Type } from '@sinclair/typebox';
import { Stack as BaseStack } from '@chakra-ui/react';
import Slot from '../_internal/Slot';
export const DirectionSchema = Type.Union([
    Type.KeyOf(Type.Object({
        column: Type.String(),
        'column-reverse': Type.String(),
        row: Type.String(),
        'row-reverse': Type.String(),
    })),
    Type.Array(Type.KeyOf(Type.Object({
        column: Type.String(),
        'column-reverse': Type.String(),
        row: Type.String(),
        'row-reverse': Type.String(),
    }))),
]);
export const FlexWrapSchema = Type.KeyOf(Type.Object({
    nowrap: Type.String(),
    wrap: Type.String(),
    'wrap-reverse': Type.String(),
}));
export const AlignItemsSchema = Type.String();
export const JustifyContentSchema = Type.String();
export const SpacingSchema = Type.Union([Type.String(), Type.Number()]);
const Stack = ({ direction, wrap, align, justify, spacing, slotsMap, }) => {
    return (_jsx(BaseStack, Object.assign({}, { direction, wrap, align, justify, spacing }, { children: _jsx(Slot, { slotsMap: slotsMap, slot: "content" }, void 0) }), void 0));
};
const PropsSchema = Type.Object({
    direction: DirectionSchema,
    wrap: FlexWrapSchema,
    align: AlignItemsSchema,
    justify: JustifyContentSchema,
    spacing: SpacingSchema,
});
export default Object.assign(Object.assign({}, createComponent({
    version: 'chakra_ui/v1',
    metadata: {
        name: 'stack',
        displayName: 'Stack',
        description: 'chakra-ui stack',
        isResizable: true,
        isDraggable: true,
        exampleProperties: {
            direction: 'column',
            spacing: 10,
        },
        exampleSize: [6, 6],
    },
    spec: {
        properties: PropsSchema,
        state: {},
        methods: [],
        slots: ['content'],
        styleSlots: [],
        events: [],
    },
})), { impl: Stack });
//# sourceMappingURL=Stack.js.map