import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms'; import { RestrictionsOrder, WorkTimeValidator, ScheduleValidator } from '@webresto/worktime'; /** * Creates a validator that checks if the order date falls within the allowed * schedule. * * @param restrictionsData Data describing ordering restrictions. * @param scheduleValidator Schedule validator used to verify working intervals. */ export declare function orderDateValidator(restrictionsData: RestrictionsOrder | null | undefined, scheduleValidator: ScheduleValidator): ValidatorFn; /** * Builds a validator that verifies whether a chosen delivery date is within * the range allowed by the restrictions data and work time settings. * * @param restrictionsData Ordering restrictions with timezone information. * @param workTimeValidator Helper providing work time calculations. */ export declare function deliveryDateValidator(restrictionsData: RestrictionsOrder | null | undefined, workTimeValidator: WorkTimeValidator): ValidatorFn; /** * Creates a validator ensuring the selected delivery time fits within the * allowed working hours and respects the minimum delivery interval. * * @param restrictionsData Ordering restrictions for the restaurant. * @param workTimeValidator Utility used for work time calculations. */ export declare function deliveryTimeValidator(restrictionsData: RestrictionsOrder | null | undefined, workTimeValidator: WorkTimeValidator): ValidatorFn; /** * Validates that the street field is filled when delivery to an address is * selected. */ export declare function addressStreetValidator(form: AbstractControl): ValidationErrors | null; /** * Validates that the street value is selected from the provided list when * delivery to an address is chosen. */ export declare function addressStreetIdValidator(form: AbstractControl): ValidationErrors | null; /** * Ensures that the house number is provided when delivery to an address is * required. */ export declare function addressHomeValidator(form: AbstractControl): ValidationErrors | null; /** * Validates that at least one contact method is provided by the user. */ export declare function contactMethodValidator(form: AbstractControl): ValidationErrors | null; /** * Checks that a pickup point is selected when the order is marked for * self-service pickup. */ export declare function pickupPointIdValidator(form: AbstractControl): ValidationErrors | null; /** * Returns a simple validator that checks a control for a non-empty value. */ export declare function isReqiredFieldValidator(controlName: string): ValidatorFn;