import React from 'react';
import { useI18n } from '@smg-automotive/i18n-pkg';
import { Box, GridItem } from '@chakra-ui/react';
import MobileOnlyAccordionPanel from '../../../mobileOnlyAccordion/MobileOnlyAccordionPanel.js';
import MobileOnlyAccordionItem from '../../../mobileOnlyAccordion/MobileOnlyAccordionItem.js';
import MobileOnlyAccordionButton from '../../../mobileOnlyAccordion/MobileOnlyAccordionButton.js';
import MobileOnlyAccordion from '../../../mobileOnlyAccordion/index.js';
import List from '../../../list/index.js';
import { DrawerNavigationLink } from './DrawerNavigationLink.js';

var NonCollapsibleSection = function (_a) {
    var node = _a.node;
    return (React.createElement(Box, { py: { base: '2xl', md: 0 }, px: "2xl" },
        React.createElement(List, null, node.items.map(function (item, index) {
            return React.createElement(DrawerNavigationLink, { item: item, key: index });
        }))));
};
var CollapsibleSection = function (_a) {
    var node = _a.node;
    var t = useI18n().t;
    if (!node.translationKey && !node.title) {
        return null;
    }
    return (React.createElement(GridItem, null,
        React.createElement(MobileOnlyAccordion, { allowMultiple: true },
            React.createElement(MobileOnlyAccordionItem, { border: "none" },
                React.createElement(Box, { as: MobileOnlyAccordionButton, flex: "1", textAlign: "left", fontSize: "base", paddingTop: { base: 'md', md: 0 } }, node.translationKey ? t(node.translationKey) : node.title),
                React.createElement(Box, { as: MobileOnlyAccordionPanel, paddingTop: { base: 'lg', md: 0 }, paddingBottom: "0" },
                    React.createElement(List, null, node.items.map(function (item, index) { return (React.createElement(DrawerNavigationLink, { item: item, key: index })); })))))));
};

export { CollapsibleSection, NonCollapsibleSection };
//# sourceMappingURL=DrawerSections.js.map
