import { Injectable } from '@angular/core';
import { IUrlTimeRange } from '@typings/common/url';

@Injectable({
    providedIn: 'root',
})
export class ScheduleFiltersStateService {
    arrival: string;
    departure: string;
    dateRange: Date[] = [];
    timeRange: IUrlTimeRange = {};
    returnDateRange: Date[] = [];
    returnTimeRange: IUrlTimeRange;

    directOnly = false;
    withReturn = false;

    clear() {
        this.arrival = undefined;
        this.departure = undefined;
        this.dateRange = undefined;
        this.timeRange = undefined;
        this.returnDateRange = undefined;
        this.returnTimeRange = undefined;

        this.directOnly = false;
        this.withReturn = false;
    }
}
