import * as i0 from '@angular/core';
import { Injectable } from '@angular/core';
import * as i1 from '@testlocallibrary/shared-kernel/services/language';

class NavBarService {
    constructor(languageService) {
        this.languageService = languageService;
        this.navBarContentVM = [];
    }
    setNavBarContent(NavBarDataConst) {
        let language = this.languageService.getLanguage();
        this.navBarContentVM = NavBarDataConst.map(item => ({
            ...item,
            links: item.links?.map((link) => ({
                ...link,
                url: link.url.replace('{language}', language)
            })),
            url: item.url?.replace('{language}', language)
        }));
        return this.navBarContentVM;
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavBarService, deps: [{ token: i1.LanguageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavBarService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavBarService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root'
                }]
        }], ctorParameters: function () { return [{ type: i1.LanguageService }]; } });

/**
 * Generated bundle index. Do not edit.
 */

export { NavBarService };
//# sourceMappingURL=testlocallibrary-shared-kernel-services-nav-bar.mjs.map
