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 } from '@finos/legend-art';
import { PackageableElementImplicitReference, } from '@finos/legend-graph';
export const TDSResultTypeViewer = observer((props) => {
    const { resultType } = props;
    return (_jsxs("div", { className: "query-builder__result__container", children: [_jsx(PanelListItem, { className: "query-builder__result__container__item__tds", children: "Result type: TDS" }), _jsx(PanelDivider, {}), _jsxs("table", { className: "query-builder__result__container__table table", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { className: "table__cell--left", children: "Label" }), _jsx("th", { className: "table__cell--left", children: "Result DataType" })] }) }), _jsx("tbody", { children: resultType.tdsColumns.map((column) => (_jsxs("tr", { children: [_jsx("td", { className: "table__cell--left", children: column.name }), _jsx("td", { className: "table__cell--left", children: column.type instanceof PackageableElementImplicitReference &&
                                        (column.type.input ?? '') })] }, column.name))) })] }), _jsx(PanelDivider, {})] }));
});
//# sourceMappingURL=TDSResultTypeViewer.js.map