import { Injectable, signal } from '@angular/core';
import { DatepickerView } from './types/datepicker-view.type';

/**
 * Service for managing the view state of the datepicker.
 * Provides reactive signals for the displayed view mode and date.
 */
@Injectable()
export class DatepickerViewState {
  /**
   * Signal representing the currently displayed view mode of the datepicker.
   * Defaults to the day view.
   */
  readonly displayedView = signal<DatepickerView>(DatepickerView.Day);

  /**
   * Signal representing the currently displayed date in the datepicker.
   * Initialized with the current date.
   */
  readonly displayedDate = signal<Date>(new Date());
}
