// @flow

export type BuildingStatusType =
  | 'Open'
  | 'Closed'
  | 'Almost Closed'
  | 'Almost Open'
  | 'Chapel'

export type DayOfWeekEnumType = 'Mo' | 'Tu' | 'We' | 'Th' | 'Fr' | 'Sa' | 'Su'

export type BreakNameEnumType =
  | 'fall'
  | 'thanksgiving'
  | 'christmasfest'
  | 'winter'
  | 'interim'
  | 'spring'
  | 'easter'
  | 'summer'

export type SingleBuildingScheduleType = {|
  days: DayOfWeekEnumType[],
  from: string,
  to: string,
|}

export type NamedBuildingScheduleType = {
  title: 'Hours' | string,
  notes?: string,
  isPhysicallyOpen?: boolean,
  closedForChapelTime?: boolean,
  hours: SingleBuildingScheduleType[],
}

export type BreakScheduleContainerType = {
  [key: BreakNameEnumType]: NamedBuildingScheduleType[],
}

export type BuildingType = {|
  name: string,
  subtitle?: string,
  abbreviation?: string,
  image?: string,
  category: string,
  schedule: NamedBuildingScheduleType[],
  breakSchedule?: BreakScheduleContainerType,
|}

@@ -383,17 +383,16 @@
 Type = %7B
-%7C
 %0A  days:
@@ -443,17 +443,16 @@
 string,%0A
-%7C
 %7D%0A%0Aexpor
@@ -769,17 +769,16 @@
 Type = %7B
-%7C
 %0A  name:
@@ -957,11 +957,10 @@
 erType,%0A
-%7C
 %7D%0A

remove exact object types that need to use spreading