import { __spreadArray, __assign } from '../../../../node_modules/tslib/tslib.es6.js';
import { autoScoutVehiclesLinkConfig, motoScoutVehiclesLinkConfig, carParkLinkConfig, motorcycleParkLinkConfig } from './vehiclePool.js';
import { editUsersLinkConfig, changeLanguageLinkConfig, savedSearchesLinkConfig, getFavoritesLinkConfig, getLogoutLinkConfig } from './user.js';
import { autoScoutTopVehiclesLinkConfig, motoScoutTopVehiclesLinkConfig } from './topVehicles.js';
import { topListingProLinkConfig } from './topListing.js';
import { teaserTemplatesLinkConfig, commentTemplatesLinkConfig } from './templates.js';
import { privateAutoScoutSellLinkConfig, professionalSellLinkConfig, privateMotoScoutSellLinkConfig, insertionLinkConfig } from './sell.js';
import { autoScoutSellerSearchLinkConfig, motoScoutSellerSearchLinkConfig, searchMotorcycleLinkConfig, searchCarsLinkConfig, simpleSearchLinkConfig, advancedSearchLinkConfig } from './search.js';
import { printCenterLinkConfig } from './print.js';
import { infoPageLinkConfig, contactDetailsLinkConfig, openingHoursLinkConfig, businessImageLinkConfig, photoBarLinkConfig, qualilogoLinkConfig } from './Presence.js';
import { getPartnerHubLinkConfig } from './partnerHub.js';
import { optimizerLinkConfig } from './Optimizer.js';
import { marketPriceCheckLinkConfig } from './marketPriceCheckConfig.js';
import { magazineLinkConfig } from './magazine.js';
import { leadsManagementLinkConfig } from './leadsManagement.js';
import { switchToGermanLinkConfig, switchToFrenchLinkConfig, switchToItalianLinkConfig } from './language.js';
import { getAutoScoutInsuranceComparisonLinkConfig, getMotoScoutInsuranceComparisonLinkConfig, getProfessionalAutoScoutInsuranceComparisonLinkConfig } from './insuranceComparison.js';
import { infoPortalLinkConfig } from './infoPortal.js';
import { hciLinkConfig } from './hci.js';
import { estimateLinkConfig } from './estimate.js';
import { electromobilityLinkConfig } from './electroMobility.js';
import { getComparisonNodeItem } from './comparison.js';
import { cockpitLinkConfig } from './cockpit.js';
import { autoRadarLinkConfig } from './AutoRadar.js';
import { autoScoutAssureLinkConfig, motoScoutAssureLinkConfig } from './assure.js';
import { onlineAdvertisingLinkConfig } from './advertise.js';

var DrawerNode;
(function (DrawerNode) {
    DrawerNode["Search"] = "search";
    DrawerNode["User"] = "user";
    DrawerNode["More"] = "more";
    DrawerNode["Combined"] = "combined";
})(DrawerNode || (DrawerNode = {}));
var getUserNodeItems = function (_a) {
    var sellerId = _a.sellerId, onLogout = _a.onLogout, trackEvent = _a.trackEvent, comparisonItemIds = _a.comparisonItemIds;
    return [
        {
            translationKey: 'header.userMenu.manageVehicles',
            items: [
                insertionLinkConfig,
                autoScoutVehiclesLinkConfig,
                motoScoutVehiclesLinkConfig,
                optimizerLinkConfig,
                cockpitLinkConfig,
                carParkLinkConfig,
                motorcycleParkLinkConfig,
            ],
        },
        {
            translationKey: 'header.userMenu.toolsForSelling',
            items: [
                leadsManagementLinkConfig,
                printCenterLinkConfig,
                getPartnerHubLinkConfig({ sellerId: sellerId }),
                topListingProLinkConfig,
                autoScoutTopVehiclesLinkConfig,
                motoScoutTopVehiclesLinkConfig,
                onlineAdvertisingLinkConfig,
                getProfessionalAutoScoutInsuranceComparisonLinkConfig({ sellerId: sellerId }),
                getAutoScoutInsuranceComparisonLinkConfig({
                    private: true,
                    professional: false,
                }),
                getMotoScoutInsuranceComparisonLinkConfig({
                    private: true,
                    professional: false,
                }),
            ],
        },
        {
            translationKey: 'header.userMenu.toolsForPurchasing',
            items: __spreadArray(__spreadArray([
                savedSearchesLinkConfig,
                getFavoritesLinkConfig({
                    trackEvent: trackEvent,
                    eventLabel: 'drawer-user',
                })
            ], getComparisonNodeItem({
                comparisonItemIds: comparisonItemIds,
                trackEvent: trackEvent,
                eventLabel: 'drawer-user',
            }), true), [
                autoRadarLinkConfig,
                marketPriceCheckLinkConfig,
            ], false),
        },
        {
            translationKey: 'header.userMenu.accountSettings',
            items: [
                editUsersLinkConfig,
                changeLanguageLinkConfig,
                getLogoutLinkConfig({ onLogout: onLogout }),
            ],
        },
        {
            translationKey: 'header.userMenu.settings',
            items: [
                infoPageLinkConfig,
                contactDetailsLinkConfig,
                openingHoursLinkConfig,
                businessImageLinkConfig,
                photoBarLinkConfig,
                teaserTemplatesLinkConfig,
                commentTemplatesLinkConfig,
                qualilogoLinkConfig,
                autoRadarLinkConfig,
                hciLinkConfig,
                infoPortalLinkConfig,
            ],
        },
    ];
};
var drawerNodeItems = function (_a) {
    var comparisonItemIds = _a.comparisonItemIds, sellerId = _a.sellerId, trackEvent = _a.trackEvent, onLogout = _a.onLogout, currentLanguage = _a.currentLanguage, isLoggedIn = _a.isLoggedIn;
    return ({
        search: [
            {
                translationKey: 'header.searchMenu.vehicles',
                items: __spreadArray([
                    simpleSearchLinkConfig,
                    advancedSearchLinkConfig
                ], getComparisonNodeItem({
                    comparisonItemIds: comparisonItemIds,
                    trackEvent: trackEvent,
                    eventLabel: 'drawer-search',
                }), true),
            },
            {
                translationKey: 'header.searchMenu.dealer',
                items: [autoScoutSellerSearchLinkConfig, motoScoutSellerSearchLinkConfig],
            },
            {
                translationKey: 'header.searchMenu.additional',
                items: [
                    searchMotorcycleLinkConfig,
                    searchCarsLinkConfig,
                    getAutoScoutInsuranceComparisonLinkConfig({
                        private: true,
                        professional: true,
                    }),
                    getMotoScoutInsuranceComparisonLinkConfig({
                        private: true,
                        professional: true,
                    }),
                    __assign(__assign({}, privateAutoScoutSellLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                    __assign(__assign({}, professionalSellLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                    __assign(__assign({}, privateMotoScoutSellLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                    __assign(__assign({}, estimateLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                    __assign(__assign({}, autoScoutAssureLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                    __assign(__assign({}, motoScoutAssureLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                    __assign(__assign({}, electromobilityLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                    __assign(__assign({}, magazineLinkConfig({ trackEvent: trackEvent })), { showUnderMoreLinkBelow: 'sm' }),
                ],
            },
        ],
        user: getUserNodeItems({ sellerId: sellerId, onLogout: onLogout, trackEvent: trackEvent, comparisonItemIds: comparisonItemIds }),
        more: [
            {
                items: [
                    privateAutoScoutSellLinkConfig({ trackEvent: trackEvent }),
                    professionalSellLinkConfig({ trackEvent: trackEvent }),
                    privateMotoScoutSellLinkConfig({ trackEvent: trackEvent }),
                    estimateLinkConfig({ trackEvent: trackEvent }),
                    autoScoutAssureLinkConfig({ trackEvent: trackEvent }),
                    motoScoutAssureLinkConfig({ trackEvent: trackEvent }),
                    electromobilityLinkConfig({ trackEvent: trackEvent }),
                    magazineLinkConfig({ trackEvent: trackEvent }),
                ],
            },
        ],
        combined: __spreadArray(__spreadArray([
            {
                translationKey: 'header.search',
                items: __spreadArray(__spreadArray([
                    simpleSearchLinkConfig,
                    advancedSearchLinkConfig
                ], getComparisonNodeItem({
                    comparisonItemIds: comparisonItemIds,
                    trackEvent: trackEvent,
                    eventLabel: 'drawer-search',
                }), true), [
                    autoScoutSellerSearchLinkConfig,
                    motoScoutSellerSearchLinkConfig,
                    searchMotorcycleLinkConfig,
                    searchCarsLinkConfig,
                ], false),
            },
            {
                translationKey: 'header.sell',
                items: [
                    privateAutoScoutSellLinkConfig({ trackEvent: trackEvent }),
                    professionalSellLinkConfig({ trackEvent: trackEvent }),
                    privateMotoScoutSellLinkConfig({ trackEvent: trackEvent }),
                    estimateLinkConfig({ trackEvent: trackEvent }),
                ],
            },
            {
                translationKey: 'header.searchMenu.additional',
                items: [
                    getAutoScoutInsuranceComparisonLinkConfig({
                        private: true,
                        professional: true,
                    }),
                    getMotoScoutInsuranceComparisonLinkConfig({
                        private: true,
                        professional: true,
                    }),
                    autoScoutAssureLinkConfig({ trackEvent: trackEvent }),
                    motoScoutAssureLinkConfig({ trackEvent: trackEvent }),
                    electromobilityLinkConfig({ trackEvent: trackEvent }),
                    magazineLinkConfig({ trackEvent: trackEvent }),
                ],
            }
        ], (isLoggedIn
            ? getUserNodeItems({ sellerId: sellerId, onLogout: onLogout, trackEvent: trackEvent, comparisonItemIds: comparisonItemIds })
            : []), true), [
            {
                title: currentLanguage.toUpperCase(),
                items: [
                    switchToGermanLinkConfig({ currentLanguage: currentLanguage }),
                    switchToFrenchLinkConfig({ currentLanguage: currentLanguage }),
                    switchToItalianLinkConfig({ currentLanguage: currentLanguage }),
                ],
            },
        ], false),
    });
};

export { DrawerNode, drawerNodeItems };
//# sourceMappingURL=DrawerNodeItems.js.map
