import { Component } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { CommonModule, CoreModule } from '@c8y/ngx-components';
import { MapModule } from '@c8y/ngx-components/map';
import { TrackingMarkerPopupComponent } from '@c8y/ngx-components/tracking';
import * as i0 from "@angular/core";
import * as i1 from "@angular/router";
import * as i2 from "@c8y/ngx-components";
import * as i3 from "@c8y/ngx-components/map";
export class DeviceMapComponent {
    constructor(route) {
        const { location, bounds } = route.snapshot.data;
        this.config = {
            center: bounds?.isValid() ? bounds.getCenter() : location,
            zoomLevel: 3,
            refreshInterval: 30000,
            bounds,
            fitBoundsOptions: {
                padding: [50, 50]
            }
        };
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeviceMapComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: DeviceMapComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<c8y-title>{{ 'Device map' | translate }}</c8y-title>\n\n<c8y-breadcrumb>\n  <c8y-breadcrumb-item\n    icon=\"exchange\"\n    [label]=\"'Devices' | translate\"\n  ></c8y-breadcrumb-item>\n  <c8y-breadcrumb-item\n    icon=\"c8y-location\"\n    [label]=\"'Map' | translate\"\n  ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div class=\"card card--grid content-fullpage\">\n  <div\n    class=\"bg-white p-relative\"\n    style=\"min-height: 30vh\"\n  >\n    <c8y-map-status\n      [clusterMap]=\"map\"\n      [(config)]=\"config\"\n    ></c8y-map-status>\n    <c8y-cluster-map\n      #map\n      [config]=\"config\"\n    >\n      <div *c8yMapPopup=\"let context\">\n        <c8y-tracking-marker-popup\n          [showTrackingLink]=\"true\"\n          [context]=\"context\"\n        ></c8y-tracking-marker-popup>\n      </div>\n    </c8y-cluster-map>\n  </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }, { kind: "ngmodule", type: CoreModule }, { kind: "component", type: i2.BreadcrumbComponent, selector: "c8y-breadcrumb" }, { kind: "component", type: i2.BreadcrumbItemComponent, selector: "c8y-breadcrumb-item", inputs: ["icon", "translate", "label", "path", "injector"] }, { kind: "component", type: i2.TitleComponent, selector: "c8y-title", inputs: ["pageTitleUpdate"] }, { kind: "ngmodule", type: MapModule }, { kind: "component", type: i3.MapStatusComponent, selector: "c8y-map-status", inputs: ["config", "clusterMap", "buttonsConfig"], outputs: ["configChange", "onUnfollow"] }, { kind: "component", type: i3.ClusterMapComponent, selector: "c8y-cluster-map", inputs: ["config", "rootNode", "asset", "showClusterColor"], outputs: ["mapChange"] }, { kind: "directive", type: i3.MapPopupDirective, selector: "[c8yMapPopup]" }, { kind: "component", type: TrackingMarkerPopupComponent, selector: "c8y-tracking-marker-popup", inputs: ["context", "showTrackingLink"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: DeviceMapComponent, decorators: [{
            type: Component,
            args: [{ standalone: true, imports: [CommonModule, CoreModule, MapModule, TrackingMarkerPopupComponent], template: "<c8y-title>{{ 'Device map' | translate }}</c8y-title>\n\n<c8y-breadcrumb>\n  <c8y-breadcrumb-item\n    icon=\"exchange\"\n    [label]=\"'Devices' | translate\"\n  ></c8y-breadcrumb-item>\n  <c8y-breadcrumb-item\n    icon=\"c8y-location\"\n    [label]=\"'Map' | translate\"\n  ></c8y-breadcrumb-item>\n</c8y-breadcrumb>\n\n<div class=\"card card--grid content-fullpage\">\n  <div\n    class=\"bg-white p-relative\"\n    style=\"min-height: 30vh\"\n  >\n    <c8y-map-status\n      [clusterMap]=\"map\"\n      [(config)]=\"config\"\n    ></c8y-map-status>\n    <c8y-cluster-map\n      #map\n      [config]=\"config\"\n    >\n      <div *c8yMapPopup=\"let context\">\n        <c8y-tracking-marker-popup\n          [showTrackingLink]=\"true\"\n          [context]=\"context\"\n        ></c8y-tracking-marker-popup>\n      </div>\n    </c8y-cluster-map>\n  </div>\n</div>\n" }]
        }], ctorParameters: () => [{ type: i1.ActivatedRoute }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGV2aWNlLW1hcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9kZXZpY2UtbWFwL2RldmljZS1tYXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vZGV2aWNlLW1hcC9kZXZpY2UtbWFwLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQ2pELE9BQU8sRUFBRSxZQUFZLEVBQUUsVUFBVSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDL0QsT0FBTyxFQUFvQixTQUFTLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN0RSxPQUFPLEVBQUUsNEJBQTRCLEVBQUUsTUFBTSw4QkFBOEIsQ0FBQzs7Ozs7QUFPNUUsTUFBTSxPQUFPLGtCQUFrQjtJQUc3QixZQUFZLEtBQXFCO1FBQy9CLE1BQU0sRUFBRSxRQUFRLEVBQUUsTUFBTSxFQUFFLEdBQUcsS0FBSyxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUM7UUFDakQsSUFBSSxDQUFDLE1BQU0sR0FBRztZQUNaLE1BQU0sRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxTQUFTLEVBQUUsQ0FBQyxDQUFDLENBQUMsUUFBUTtZQUN6RCxTQUFTLEVBQUUsQ0FBQztZQUNaLGVBQWUsRUFBRSxLQUFLO1lBQ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