import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { InfoCircleOutlined, ArrowRightOutlined } from '@ant-design/icons';
import { Modal, Typography } from 'antd';
import { Flex, Box } from '../../grid';
import { useRollupDesignerContext } from '../Context';
import { RollupDesigner } from '../RollupDesigner';
const { Link } = Typography;
export function RollupDesignerModal({ onAfterClose, ...props }) {
    const { isModalOpen, toggleModal, memberTypeCubeMap } = useRollupDesignerContext();
    return (_jsx(Modal, { title: "Rollup Designer", visible: isModalOpen, bodyStyle: { padding: 0 }, destroyOnClose: true, wrapClassName: "rollup-designer", footer: _jsx(Link, { href: "https://cube.dev/docs/pre-aggregations/getting-started-pre-aggregations", target: "_blank", children: _jsxs(Flex, { justifyContent: "center", gap: 1, children: [_jsx(Box, { children: _jsx(InfoCircleOutlined, {}) }), _jsx(Box, { children: "Further reading about pre-aggregations for reference." }), _jsx(Box, { children: _jsx(ArrowRightOutlined, {}) })] }) }), width: 1190, afterClose: onAfterClose, onCancel: () => toggleModal(), children: _jsx("div", { "data-testid": "rd-modal", children: _jsx(RollupDesigner, { apiUrl: props.apiUrl, token: props.token, memberTypeCubeMap: memberTypeCubeMap }) }) }));
}
//# sourceMappingURL=RollupDesignerModal.js.map