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 { generateGAVCoordinates } from '@finos/legend-storage';
export const buildServiceOption = (value) => ({
    label: value.name,
    value,
});
export const formatServiceOptionLabel = (option) => (_jsxs("div", { className: "query-setup__service-option", title: `${option.label} - ${option.value.urlPattern ?? ''} - ${option.value.path} - ${generateGAVCoordinates(option.value.groupId, option.value.artifactId, option.value.versionId)}`, children: [_jsx("div", { className: "query-setup__service-option__label", children: option.label }), _jsx("div", { className: "query-setup__service-option__path", children: option.value.path }), _jsx("div", { className: "query-setup__service-option__pattern", children: option.value.urlPattern ?? 'no pattern' }), _jsx("div", { className: "query-setup__service-option__gav", children: option.value.groupId && option.value.artifactId
                ? generateGAVCoordinates(option.value.groupId, option.value.artifactId, option.value.versionId)
                : null })] }));
//# sourceMappingURL=ServiceQuerySetupUtils.js.map