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 { observer } from 'mobx-react-lite';
import { PanelListItem, PanelDivider, PanelContent } from '@finos/legend-art';
import { ConstantExecutionNode, } from '@finos/legend-graph';
import { ResultTypeViewer } from './ResultTypeViewer.js';
import { ConstantExecutionNodeViewer } from './ConstantExecutionNodeViewer.js';
export const AllocationExecutionNodeViewer = observer((props) => {
    const { node, executionPlanState } = props;
    const varName = node.varName;
    const resultType = node.resultType;
    const realizeInMemory = node.realizeInMemory?.toString();
    const applicationStore = executionPlanState.applicationStore;
    return (_jsxs(PanelContent, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, children: [_jsx("div", { className: "query-builder__allocation__container", children: _jsxs("div", { children: [_jsx(PanelListItem, { className: "query-builder__allocation__container__item__label", children: "Allocation Node Details" }), _jsx(PanelDivider, {}), _jsx("div", { className: "query-builder__allocation__container__item", children: _jsx("table", { className: "query-builder__allocation__container__table", children: _jsxs("tbody", { children: [_jsxs("tr", { children: [_jsx("td", { children: "varName" }), _jsx("td", { children: `: ${varName}` })] }), _jsxs("tr", { children: [_jsx("td", { children: "realizeInMemory" }), _jsx("td", { children: `: ${realizeInMemory}` })] })] }) }) })] }) }), _jsx(PanelDivider, {}), _jsx(ResultTypeViewer, { resultType: resultType }), _jsx(PanelDivider, {}), node.executionNodes.length > 0 &&
                node.executionNodes[0] !== undefined &&
                node.executionNodes[0] instanceof ConstantExecutionNode && (_jsx(ConstantExecutionNodeViewer, { cnode: node.executionNodes[0], executionPlanState: executionPlanState })), _jsx(PanelDivider, {})] }));
});
//# sourceMappingURL=AllocationExecutionNodeViewer.js.map