import { c as __spreadArray, _ as __assign } from '../tslib.es6-20a2a300.js';
import { jsx } from 'react/jsx-runtime';
import { Item } from './utils/gridStories.js';
import GridItem from '../components/GridItem.js';
import GridContainer from '../components/GridContainer.js';
import { u as useTheme } from '../useTheme-27496d89.js';
import { u as useMediaQuery } from '../useMediaQuery-d0d673c2.js';
import '../styled-339d0187.js';
import '../defaultTheme-49a26576.js';
import 'react';
import '../clsx.m-6243b874.js';
import '../hoist-non-react-statics.cjs-b718ab87.js';
import '../Paper-cfd8f963.js';
import '../withStyles-99aeb25b.js';
import '../makeStyles-c9a99c7a.js';
import '../createStyles-16423e9e.js';
import '../Grid-7099154b.js';
import '../deprecatedPropType-0232df1e.js';

var gridLayoutArgTypes = {
    itemCount: {
        name: "itemCount",
        description: "The amount of items in the grid container.",
        defaultValue: 6,
        control: { type: "range", min: 1, max: 12, step: 1 }
    }
};
var Template = function (args) {
    var theme = useTheme();
    var isMobile = useMediaQuery(theme.breakpoints.down("sm"));
    var mdSize = Number.isInteger(12 / args.itemCount) ? 12 / args.itemCount : "auto";
    return (jsx(GridContainer, { children: __spreadArray([], new Array(args.itemCount)).map(function (num, index) { return (jsx(GridItem, __assign({ md: mdSize }, { children: jsx(Item, { children: isMobile ? "xs=12" : "md=" + mdSize }, void 0) }), index)); }) }, void 0));
};
var Default = Template.bind({});
var GridRepeatingItems_stories = {
    title: "Grid/Repeating items",
    component: GridContainer,
    subcomponents: { GridItem: GridItem },
    argTypes: gridLayoutArgTypes,
    parameters: {
        docs: {
            description: {
                component: "Both `GridContainer` and `GridItem` inherit Mui's `Grid` component, but preset with attributes that align with our design system."
            },
            source: {
                type: "code"
            }
        }
    }
};

export { Default, GridRepeatingItems_stories as default };
