import { __assign } from '../../../../node_modules/tslib/tslib.es6.js';
import { navigationEventCategory } from '../../../../types/tracking.js';
import { getComparisonUrl, shouldShowComparisonLink } from '../ComparisonItem.js';

var comparisonLinkConfig = function (_a) {
    var comparisonItemIds = _a.comparisonItemIds;
    return {
        translationKey: 'header.searchMenu.comparison',
        translationParameters: {
            numberOfItems: comparisonItemIds.length,
        },
        link: {
            de: "/de/".concat(getComparisonUrl(comparisonItemIds)),
            en: "/en/".concat(getComparisonUrl(comparisonItemIds)),
            fr: "/fr/".concat(getComparisonUrl(comparisonItemIds)),
            it: "/it/".concat(getComparisonUrl(comparisonItemIds)),
        },
        visibilitySettings: {
            userType: {
                guest: true,
                private: true,
                professional: true,
            },
            brand: {
                autoscout24: true,
                motoscout24: true,
            },
        },
        projectIdentifier: 'listings-web',
    };
};
var getComparisonNodeItem = function (_a) {
    var comparisonItemIds = _a.comparisonItemIds, trackEvent = _a.trackEvent, eventLabel = _a.eventLabel;
    return shouldShowComparisonLink(comparisonItemIds)
        ? [
            __assign(__assign({}, comparisonLinkConfig({ comparisonItemIds: comparisonItemIds })), { onClick: function () {
                    return trackEvent === null || trackEvent === void 0 ? void 0 : trackEvent({
                        eventCategory: navigationEventCategory,
                        eventAction: 'open_comparison_tool',
                        eventLabel: eventLabel,
                    });
                } }),
        ]
        : [];
};

export { comparisonLinkConfig, getComparisonNodeItem };
//# sourceMappingURL=comparison.js.map
