'use strict';

var React = require('react');
var classnames = require('classnames');
var GridCell = require('./GridCell-cjs.js');
var getMappedAtlantisSpaceToken = require('./getMappedAtlantisSpaceToken-cjs.js');

var styles = {"grid":"_0X4jj5NERa4-","gap":"d3vl57tdCWA-","spinning":"Y--XfgJk5Fw-"};

var alignments = {"center":"V-24AGDyie4-","start":"H0zdYNTapmM-","end":"O5VtcGWRV3M-","stretch":"wVv5gaWrouI-","spinning":"DcsVgHCowbg-"};

const GRID_TEST_ID = "ATL-Grid";
function getGapStyles(gap) {
    if (typeof gap === "boolean") {
        if (gap === true) {
            return { className: styles.gap };
        }
        return {};
    }
    const gapValue = getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gap);
    if (gapValue) {
        return { style: { gap: gapValue } };
    }
    return {};
}
function Grid({ alignItems = "start", gap = true, children, }) {
    const { className: gapClass, style: gapStyle } = getGapStyles(gap);
    return (React.createElement("div", { "data-testid": GRID_TEST_ID, className: classnames(styles.grid, alignments[alignItems], gapClass), style: gapStyle }, children));
}
Grid.Cell = GridCell.GridCell;

exports.GRID_TEST_ID = GRID_TEST_ID;
exports.Grid = Grid;
