export interface DateChoice { literal: string, timeList: TimeSlices[], date_object: Date } export interface TimeSlices { literal: string } export interface PollAnswer { id: number, text: string, url: string, literal: string, date_object: Date, timeList: TimeSlices[] } export const basicSlicesOfDay: TimeSlices[] = [ {literal: 'matin'}, {literal: 'midi'}, {literal: 'soir'} ]; export const otherSlicesOfDay: TimeSlices[] = [ {literal: 'aux aurores'}, {literal: 'au petit dej'}, {literal: 'au deuxième petit dej des hobbits'} ]; export const defaultTimeOfDay: TimeSlices[] = (() => { return [...basicSlicesOfDay] })(); export const otherTimeOfDay: TimeSlices[] = (() => { return [...otherSlicesOfDay] })(); export const defaultDates: DateChoice[] = [ { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate()}`, date_object: new Date(), timeList: defaultTimeOfDay }, { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 1}`, date_object: new Date(), timeList: defaultTimeOfDay }, { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 2}`, date_object: new Date(), timeList: defaultTimeOfDay } ]; export const otherDefaultDates: DateChoice[] = [ { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate()}`, date_object: new Date(), timeList: otherTimeOfDay }, { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 1}`, date_object: new Date(), timeList: defaultTimeOfDay }, { literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 2}`, date_object: new Date(), timeList: otherTimeOfDay } ]; export const defaultAnswers: PollAnswer[] = [{ id: 0, text: 'réponse de démo 1', url: 'https://mastodon.cipherbliss.com/system/media_attachments/files/001/439/118/original/6fcf149bd902841b.png?1579471574', literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate()}`, date_object: new Date(), timeList: otherSlicesOfDay }, { id: 1, text: 'réponse 2', url: 'https://mastodon.cipherbliss.com/system/media_attachments/files/001/439/118/original/6fcf149bd902841b.png?1579471574', literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 1}`, date_object: new Date(), timeList: basicSlicesOfDay }, { id: 2, text: 'la réponse D', url: 'https://mastodon.cipherbliss.com/system/media_attachments/files/001/439/118/original/6fcf149bd902841b.png?1579471574', literal: `${new Date().getFullYear()}-${new Date().getMonth()}-${new Date().getDate() + 2}`, date_object: new Date(), timeList: otherSlicesOfDay }];