import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { registerComponent } from "../interfaces";
import { Flex } from "@chakra-ui/react";
import DataContainerComponent from "../components/DataContainer";
import ListItemVariables from "../ListItemVariables";
const DataContainer = registerComponent("Data Container", {
    type: "record-list",
    icon: "Data",
    group: "data",
    kind: "container",
    experimental: true,
    defaultProps: {},
    propDefinition: {},
    Component: (props) => {
        return (_jsx(Flex, Object.assign({ width: "full", flexDir: "column", gap: 2 }, { children: !props.source.target ? (_jsx(DataContainerComponent, Object.assign({}, props))) : props.source.sourceType === "list" &&
                "rows" in props.data.component ? (props.data.component.rows.map((item, i) => (_jsx(ListItemVariables, Object.assign({ variables: item }, { children: _jsx(DataContainerComponent, Object.assign({}, props)) }), i)))) : "row" in props.data.component ? (_jsx(ListItemVariables, Object.assign({ variables: props.data.component.row }, { children: _jsx(DataContainerComponent, Object.assign({}, props)) }))) : null })));
    },
});
export default DataContainer;
//# sourceMappingURL=buildDataContainer.js.map