// eslint-disable-next-line @typescript-eslint/no-unused-vars namespace OSFramework.OSUI.Patterns.TimePicker { export abstract class AbstractTimePickerConfig extends Patterns.AbstractProviderConfiguration { /** First day of the week (0 = Sunday); forwarded to the provider locale. */ public FirstWeekDay: number; /** Time selected when the picker is built (HH:mm). */ public InitialTime: string; /** Uses a 24-hour clock; false shows an AM/PM selector. */ public Is24Hours: boolean; /** Latest selectable time (HH:mm). */ public MaxTime: string; /** Earliest selectable time (HH:mm). */ public MinTime: string; /** Display format of the selected time. */ public TimeFormat: string; constructor(config: JSON) { super(config); } /** * Method that will check if a given property (key) value is the type expected! * * @param key property name * @param value value to be check * @returns value */ public validateDefault(key: string, value: unknown): unknown { let validatedValue = undefined; switch (key) { case Enum.Properties.Is24Hours: // eslint-disable-next-line @typescript-eslint/no-unused-vars validatedValue = this.validateBoolean(value as boolean, true); break; case Enum.Properties.InitialTime: case Enum.Properties.MaxTime: case Enum.Properties.MinTime: validatedValue = this.validateTime(value as string, undefined); break; default: validatedValue = super.validateDefault(key, value); break; } return validatedValue; } } }