import { isPlatformBrowser } from '@angular/common';
import * as i0 from '@angular/core';
import { PLATFORM_ID, Injectable, Inject } from '@angular/core';
import { AppsUrlLinksConst } from '@testlocallibrary/shared-kernel/models/constants';

class ActiveUrlLinkService {
    constructor(platformId) {
        this.platformId = platformId;
        this.appsUrlLinks = AppsUrlLinksConst;
        this.isBrowser = isPlatformBrowser(platformId);
    }
    updateActiveLink() {
        let url = '';
        if (this.isBrowser) {
            url = window.location.protocol + '//' + window.location.host;
        }
        else {
            return '';
        }
        for (const key in AppsUrlLinksConst) {
            if (AppsUrlLinksConst[key] === url) {
                return key;
            }
        }
        return '';
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActiveUrlLinkService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
    static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActiveUrlLinkService, providedIn: 'root' }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ActiveUrlLinkService, decorators: [{
            type: Injectable,
            args: [{
                    providedIn: 'root',
                }]
        }], ctorParameters: function () { return [{ type: Object, decorators: [{
                    type: Inject,
                    args: [PLATFORM_ID]
                }] }]; } });

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

export { ActiveUrlLinkService };
//# sourceMappingURL=testlocallibrary-shared-kernel-services-active-url-link.mjs.map
