/**
 * PostNL Ecommerce APIsLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { lazy, object, optional, Schema } from '../schema';
import { Friday, fridaySchema } from './friday';
import { Monday, mondaySchema } from './monday';
import { Saturday, saturdaySchema } from './saturday';
import { Sunday, sundaySchema } from './sunday';
import { Thursday, thursdaySchema } from './thursday';
import { Tuesday, tuesdaySchema } from './tuesday';
import { Wednesday, wednesdaySchema } from './wednesday';

/** The standard opening hours of the pickup location */
export interface OpeningHours {
  monday?: Monday;
  tuesday?: Tuesday;
  wednesday?: Wednesday;
  thursday?: Thursday;
  friday?: Friday;
  saturday?: Saturday;
  sunday?: Sunday;
}

export const openingHoursSchema: Schema<OpeningHours> = object({
  monday: ['Monday', optional(lazy(() => mondaySchema))],
  tuesday: ['Tuesday', optional(lazy(() => tuesdaySchema))],
  wednesday: ['Wednesday', optional(lazy(() => wednesdaySchema))],
  thursday: ['Thursday', optional(lazy(() => thursdaySchema))],
  friday: ['Friday', optional(lazy(() => fridaySchema))],
  saturday: ['Saturday', optional(lazy(() => saturdaySchema))],
  sunday: ['Sunday', optional(lazy(() => sundaySchema))],
});
