import { CalendarDate, CalendarPeriod } from '../../../../../../helpers/calendar';
import { Nullable } from '../../../../../../types/general';
import { VegaCalendarWeekDayType } from '../../../../types';
import { CalendarEventBaseRepeatPattern } from './base-repeat-pattern';
/** The `CalendarEventWeeklyRepeatPattern` class in TypeScript represents a weekly repeat pattern for calendar events, allowing for matching dates based on specific weekdays and generating future dates with optional constraints. */
export declare class CalendarEventWeeklyRepeatPattern extends CalendarEventBaseRepeatPattern {
  private static weekDay;
  private byWeekDay;
  /**
   * This TypeScript constructor initializes a calendar date range with specified parameters including start date, end date, interval, count, until date, and an array of week days.
   *
   * @param {CalendarDate} startDate - The `startDate` parameter represents the starting date of the
   * calendar event or schedule. It is of type `CalendarDate`, which likely includes the year, month, and day components of a date.
   * @param {number} interval - The `interval` parameter represents the frequency of the recurrence. For
   * example, if `interval` is set to 1, the event will occur every week. If it's set to 2, the event
   * will occur every two weeks.
   * @param {Nullable<number>} count - The `count` parameter specifies the number of occurrences of the rule. If `count` is
   * provided, the recurrence will generate at most that many occurrences. If `count` is not provided,
   * the recurrence will continue indefinitely based on other parameters like `endDate` or `until`.
   * @param {Nullable<CalendarDate>} until - The `until` parameter specifies the end date for the recurrence rule. If provided,
   * the recurrence will continue until this date. If not provided, the recurrence will continue
   * indefinitely based on other parameters like `count` or `interval`.
   * @param {Nullable<VegaCalendarWeekDayType[]>} byWeekDay - The `byWeekDay` parameter is an array of
   * `VegaCalendarWeekDayType` values, which represent the days of the week for which the event should occur.
   */
  constructor(startDate: CalendarDate, interval: number, count: Nullable<number>, until: Nullable<CalendarDate>, byWeekDay: Nullable<VegaCalendarWeekDayType[]>);
  /**
   * The function `getRepeatSeries` retrieves a series of repeated events within a specified calendar period.
   *
   * @param {CalendarPeriod} period - The `period` parameter in the `getRepeatSeries` method represents
   * a specific time period in the form of a `CalendarPeriod` object. This object typically contains a
   * `startDate` and an `endDate`, which define the range of dates for which you want to generate repeat series.
   * @param {number} eventSpansDays - the current repeat series cross days, default value is one
   * @returns {CalendarDate[]} repeat start date array
   */
  getRepeatSeries(period: CalendarPeriod, eventSpansDays?: number): CalendarDate[];
  /**
   * Generate repeat display string.
   *
   * @returns {string} repeat display string
   */
  generateRepeatString(): string;
  /**
   * This function generates repeated dates and caches them until a specified end date.
   *
   * @param {CalendarDate} endDate - The `endDate` parameter is a `CalendarDate` object that represents
   * the date until which the repeat date cache needs to be generated. The function
   * `generateRepeatDateCacheUntilEndDate` generates repeat dates until this specified end date.
   */
  protected generateRepeatDateCacheUntilEndDate(endDate: CalendarDate): void;
  /**
   * The function getNextRepeatStartDate calculates the next start dates based on a given array of CalendarDate objects and returns them if certain conditions are met.
   *
   * @param {CalendarDate[]} dates - The `dates` parameter is an array of `CalendarDate` objects.
   * @returns {Nullable<CalendarDate[]>} The `getNextRepeatStartDate` function returns a nullable array of `CalendarDate` objects.
   * If there are no next dates available or if the cache count exceeds a specified limit, it returns
   * `null`. Otherwise, it returns an array of `CalendarDate` objects representing the next start dates.
   */
  private getNextRepeatStartDate;
  /**
   * The function `getNextStartDates` takes an array of `CalendarDate` objects, calculates the next dates based on a specified interval, and filters out dates that are after a specified end date.
   *
   * @param {CalendarDate[]} dates - The `dates` parameter is an array of `CalendarDate` objects
   * representing specific dates in a calendar. Each `CalendarDate` object has properties for the year,
   * month, and date.
   * @returns {Date[]} The `getNextStartDates` function returns an array of `Date` objects representing the next
   * start dates based on the input `CalendarDate` array. The function calculates the next start dates
   * by adding a specific interval (multiplied by 7 to represent weeks) to each date in the input array.
   * Finally, it filters out any dates that are after a specified `until` date, if provided.
   */
  private getNextStartDates;
  /**
   * The `initCache` function initializes a cache of calendar dates based on the start date and weekly repeat pattern.
   */
  private initCache;
  /**
   * The function `sortWeekDay` sorts an array of week days based on their position in a predefined list.
   *
   * @param {boolean} weekDay - The `weekDay` parameter is an array of week day values that need to be sorted in a
   * specific order. The function `sortWeekDay` takes this array and sorts it based on a predefined
   * order specified in `CalendarEventWeeklyRepeatPattern.weekDay`.
   * @returns {VegaCalendarWeekDayType[]} The `sortWeekDay` function is returning the `weekDay` array sorted based on the index of
   * each `VegaCalendarWeekDayType` item in the `CalendarEventWeeklyRepeatPattern.weekDay` array.
   */
  private sortWeekDay;
  /**
   * This function returns the index of the current day in a week, with Sunday represented as 0.
   *
   * @param {CalendarDate} date - The `date` parameter in the `getCurrentDayIndex` function is of type
   * `CalendarDate`, which is a custom data type representing a date in a calendar.
   * @returns {number} The function `getCurrentDayIndex` returns the index of the current day in the week, with
   * Sunday being represented as 0 and Saturday being represented as 6.
   */
  private getCurrentDayIndex;
  /**
   * The function `getValidCache` returns a filtered and concatenated array of CalendarDate objects from the cache based on a start date.
   *
   * @returns {CalendarDate[]} The `getValidCache` method returns an array of `CalendarDate` objects that meet the
   * condition of having a date greater than or equal to the `startDate` property. The method first
   * flattens a nested array of `CalendarDate` objects stored in the `cache` property, then filters out
   * the `CalendarDate` objects that do not meet the condition, and finally concatenates the filtered
   * array
   */
  private getValidCache;
}
