import React__default from 'react';
import classnames from 'classnames';
import { g as getMappedAtlantisSpaceToken, s as spaceTokens } from './getMappedAtlantisSpaceToken-es.js';

var styles = {"stack":"_7bHFxCX3jv4-","start":"MoTsKGfy3zs-","center":"oXb2OHKGH4k-","end":"Clyb5sed46w-","topOnly":"_8ttf1JCju08-","recursive":"nzG883u-wZc-","splitAfter-1":"Y-Mt8C2tNsI-","splitAfter-2":"atxW7JGTiYI-","splitAfter-3":"QuY15WlcoVo-","splitAfter-4":"Vb-dwL9R1oQ-","splitAfter-5":"IjFGwSc9hoQ-","splitAfter-6":"xUe57aXJOOk-","splitAfter-7":"pSWCwyHJBsk-","splitAfter-8":"GAlopfCh8a8-","splitAfter-9":"WMC8WPjJ8TA-","splitAfter-10":"PxqAnvgqC24-","splitAfter-11":"fEFj-rRg7pw-","splitAfter-12":"eN-ykUdJrAU-","splitAfter-13":"Jic7p-x-iKg-","splitAfter-14":"PaC-tFnXMh8-","splitAfter-15":"isuG1fzSWMs-","spinning":"f07n6aE586M-"};

function Stack({ gap = spaceTokens.base, recursive, splitAfter, children, align, autoWidth = false, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
    return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--public-stack-split": splitAfter, "--public-stack-space": getMappedAtlantisSpaceToken(gap), "--public-stack-width": autoWidth ? "auto" : "100%" }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.stack, recursive ? styles.recursive : styles.topOnly, splitAfter
            ? styles[`splitAfter-${splitAfter}`]
            : undefined, align === "center" ? styles.center : undefined, align === "start" ? styles.start : undefined, align === "end" ? styles.end : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children));
}

export { Stack as S };
