import { _ as __assign } from '../tslib.es6-faad35dc.js';
import { jsxs, jsx } from 'react/jsx-runtime';
import useMediaQuery from '@mui/material/useMediaQuery';
import { styled, useTheme } from '@mui/material/styles';
import { Item } from './utils/gridStories.js';
import GridItem from '../components/GridItem.js';
import GridContainer from '../components/GridContainer.js';
import '@mui/material/Paper';
import '@mui/material/Grid';

var NestedContainer = styled(GridContainer)(function (_a) {
    var theme = _a.theme;
    return ({
        "&": {
            backgroundColor: theme.palette.gray[300]
        }
    });
});
var Template = function () {
    var theme = useTheme();
    var isMobile = useMediaQuery(theme.breakpoints.down("sm"));
    return (jsxs(GridContainer, { children: [jsxs(NestedContainer, __assign({ item: true, md: 8, spacing: 2 }, { children: [jsx(GridItem, __assign({ md: 6 }, { children: jsx(Item, { children: isMobile ? "xs=12" : "md=6" }, void 0) }), void 0), jsx(GridItem, __assign({ md: 6 }, { children: jsx(Item, { children: isMobile ? "xs=12" : "md=6" }, void 0) }), void 0)] }), void 0), jsx(GridItem, __assign({ md: 4 }, { children: jsx(Item, { children: isMobile ? "xs=12" : "md=4" }, void 0) }), void 0)] }, void 0));
};
var Default = Template.bind({});
var GridNestedItems_stories = {
    title: "Grid/Nested items",
    component: GridContainer,
    subcomponents: { GridItem: GridItem },
    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, GridNestedItems_stories as default };
