/** * External dependencies */ import { make } from 'ts-brand'; import type { PostType, PostTypeContext, PostTypeName, Role, RoleId, Url, Uuid, } from '@nelio-content/types'; export type State = { readonly activePlugins: ReadonlyArray< string >; readonly adminUrl: Url; readonly canViewAllCalendarPosts: boolean; readonly firstDayOfWeek: number; readonly homeUrl: Url; readonly id: Uuid; readonly isMultiAuthor: boolean; readonly isStaging: boolean; readonly language: string; readonly now: string; readonly postTypes: Record< PostTypeName, PostType >; readonly postTypesByContext: Record< PostTypeContext, ReadonlyArray< PostTypeName > >; readonly restUrl: Url; readonly roles: Record< RoleId, Role >; readonly timezone: string; readonly wordsPerMinute: number; }; export const INIT: State = { activePlugins: [], adminUrl: make< Url >()( '' ), canViewAllCalendarPosts: false, firstDayOfWeek: 0, homeUrl: make< Url >()( '' ), id: make< Uuid >()( '' ), isMultiAuthor: false, isStaging: false, language: '', now: '', postTypes: {}, postTypesByContext: { analytics: [], calendar: [], comments: [], 'content-board': [], efi: [], notifications: [], 'future-actions': [], 'quality-checks': [], references: [], series: [], social: [], tasks: [], wp: [], }, restUrl: make< Url >()( '' ), roles: {}, timezone: '+00:00', wordsPerMinute: 265, };