import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@aztrix/helpers";
export class OpeningHoursDateViewComponent {
    get dateRange() {
        if (!this.dates || this.dates.length <= 2) {
            return this.dates;
        }
        return [this.dates[0], this.dates[this.dates.length - 1]];
    }
}
OpeningHoursDateViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: OpeningHoursDateViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
OpeningHoursDateViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: OpeningHoursDateViewComponent, selector: "ax-opening-hours-date-view", inputs: { dates: "dates", text: "text" }, ngImport: i0, template: "<span *ngIf=\"text\"> {{ text }}:&nbsp;</span>\n<ng-container *ngFor=\"let date of dateRange; let first = first\">\n  <span><ng-container *ngIf=\"!first\"> - </ng-container>{{ date | formatDate }}</span>\n</ng-container>\n", styles: [":host{display:block;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.FormatDatePipe, name: "formatDate" }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: OpeningHoursDateViewComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-opening-hours-date-view', template: "<span *ngIf=\"text\"> {{ text }}:&nbsp;</span>\n<ng-container *ngFor=\"let date of dateRange; let first = first\">\n  <span><ng-container *ngIf=\"!first\"> - </ng-container>{{ date | formatDate }}</span>\n</ng-container>\n", styles: [":host{display:block;font-weight:700}\n"] }]
        }], propDecorators: { dates: [{
                type: Input
            }], text: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9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