import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
/**
 * Copyright (c) 2020-present, Goldman Sachs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { DataCube } from '@finos/legend-data-cube';
import { observer } from 'mobx-react-lite';
import { clsx, Dialog, Modal, ModalFooter, ModalFooterButton, TimesIcon, } from '@finos/legend-art';
export const QueryDataCubeViewer = observer((props) => {
    const { state, close, options } = props;
    return (_jsx(Dialog, { open: true, onClose: close, classes: {
            root: 'editor-modal__root-container',
            container: 'editor-modal__container',
            paper: clsx('editor-modal__content', {
                'query-builder-data-cube__dialog__container__content': options?.fullScreen,
            }),
        }, children: _jsxs(Modal, { darkMode: false, className: clsx('editor-modal query-builder-data-cube__dialog', {
                'query-builder-data-cube__dialog--expanded': options?.fullScreen,
            }), children: [_jsx("div", { className: "query-builder-data-cube__dialog__header", children: _jsx("div", { className: "query-builder-data-cube__dialog__header__actions", children: _jsx("button", { className: "query-builder-data-cube__dialog__header__action", tabIndex: -1, onClick: close, title: "Close", children: _jsx(TimesIcon, {}) }) }) }), _jsx("div", { className: clsx('query-builder-data-cube__dialog__content', {
                        'query-builder-data-cube__dialog__content-full': options?.fullScreen,
                    }), children: _jsx(DataCube, { specification: state.specification, engine: state.engine }) }), !options?.fullScreen && (_jsx(ModalFooter, { children: _jsx(ModalFooterButton, { onClick: close, children: "Close" }) }))] }) }));
});
//# sourceMappingURL=QueryBuilderDataCube.js.map