import { jsx as _jsx } from "react/jsx-runtime";
const ALIGN_CLASS = {
    start: 'items-start',
    center: 'items-center',
    end: 'items-end',
    stretch: 'items-stretch',
};
const JUSTIFY_CLASS = {
    start: 'justify-start',
    center: 'justify-center',
    end: 'justify-end',
    between: 'justify-between',
    around: 'justify-around',
    evenly: 'justify-evenly',
};
/**
 * Vertical stack with a consistent gap between children. This is the
 * single sanctioned way to space block-level elements in the admin —
 * never reach for `space-y-*` directly.
 */
export function Stack({ space = '4', as: Component = 'div', align, justify, fill, className = '', children, ...rest }) {
    const classes = [
        'flex flex-col',
        `gap-${space}`,
        align ? ALIGN_CLASS[align] : '',
        justify ? JUSTIFY_CLASS[justify] : '',
        fill ? 'h-full' : '',
        className,
    ]
        .filter(Boolean)
        .join(' ');
    return (_jsx(Component, { className: classes, ...rest, children: children }));
}
//# sourceMappingURL=Stack.js.map