import React from 'react'; import * as zustand from 'zustand'; /** * Types related to the UI layer of the application (components/store/views) */ type LessonListItem = { programmeSlug: string; unitSlug: string; lessonSlug: string; exitQuizCount: number; isLegacy: boolean; lessonData: { keyLearningPoints?: { keyLearningPoint: string; }[] | null; keywords?: { keyword: string; description: string; }[] | null; misconceptionsAndCommonMistakes?: { misconception?: string; response?: string; }[] | null; equipmentAndResources?: { equipment: string; }[] | null; title: string; }; }; type ProgrammeFields = { optionality?: string; year: string; yearSlug?: string | null; legacy?: string | null; tier?: string | null; tierSlug?: string | null; tierDisplayOrder?: number | null; tierDescription?: string | null; examboard?: string | null; examboardSlug?: string | null; examboardDisplayOrder?: number | null; pathway?: string | null; pathwaySlug?: string | null; pathwayDisplayOrder?: number | null; subject?: string | null; subjectSlug?: string | null; subjectDescription: string; phase: string; phaseSlug?: string | null; }; type UnitData = { title: string; description?: string | null; }; type Unit = { unitData: UnitData; lessonCount: number; isLegacy: boolean; unitSlug: string; programmeFields: ProgrammeFields; }; type NewAttachment = { courseId: string; itemId: string; addOnToken: string; title: string; lessonSlug: string; programmeSlug: string; unitSlug: string; maxPoints?: number; }; type FactorData = { factor: string | null; factorSlug: string | null; factorDisplayOrder: number | null; factorDescription: string | null; isLegacy: boolean; }; type Programme = { programmeSlug: string; yearSlug: string; programmeFields: ProgrammeFields & unknown; }; type Subject = { programmeSlug: string; baseSlug: string; isLegacy: boolean; features?: { nonCurriculum?: boolean; } | null; programmeFields: ProgrammeFields; }; type Year = { yearSlug: string; yearDescription: string; phase: "primary" | "secondary"; }; declare enum AuthCookieKeys { AccessToken = "oak-gclassroom-token", Session = "oak-gclassroom-session", PupilAccessToken = "oak-gclassroom-pupil-token", PupilSession = "oak-gclassroom-pupil-session" } type Props$a = { getGoogleSignInLink: (subscribeToNewsletter?: boolean) => Promise; onSuccessfulSignIn: (signUpToNewsletter: boolean) => Promise | void; privacyPolicyUrl: string; showMailingListOption?: boolean; cookieKeys?: [ AuthCookieKeys.AccessToken | AuthCookieKeys.PupilAccessToken, AuthCookieKeys.Session | AuthCookieKeys.PupilSession ]; }; declare const GoogleSignInView: ({ getGoogleSignInLink, onSuccessfulSignIn, privacyPolicyUrl, showMailingListOption, cookieKeys, }: Props$a) => React.JSX.Element; type Props$9 = { session: string; accessToken: string; }; declare const GoogleClassroomAuthSuccessView: React.FC; type Props$8 = { years: Year[]; subjectsUrlTemplate: string; onYearSelected?: (year: Year) => void; }; declare const GoogleClassroomBrowseView: ({ years, subjectsUrlTemplate, onYearSelected, }: Props$8) => React.JSX.Element; type Props$7 = { children: React.ReactNode; verifySessionAction: () => Promise<{ authenticated: boolean; session?: string; accessToken?: string; userProfilePicUrl?: string; loginHint?: string; }>; signInUrl: string; cookieKeys?: [ AuthCookieKeys.AccessToken | AuthCookieKeys.PupilAccessToken, AuthCookieKeys.Session | AuthCookieKeys.PupilSession ]; onVerifySuccess?: () => void | Promise; }; declare const WithGoogleClassroomAuth: React.FC; type OnLessonAttachedData = { lessonName: string; unitName: string; courseId: string; itemId: string; gradeSyncEnabled: boolean; googleLoginHint?: string; }; type Props$6 = { children: React.ReactNode; createAttachmentAction: (attachment: NewAttachment) => Promise; onLessonAttached?: (data: OnLessonAttachedData) => Promise | void; }; declare const BrowseLayout: ({ children, createAttachmentAction, onLessonAttached, }: Props$6) => React.JSX.Element; type Props$5 = { browseData?: LessonListItem[]; programmeSlug: string; unitData?: UnitData; programmeFields?: ProgrammeFields; headerLeftSlot?: React.ReactElement; programmeUrlTemplate: string; pupilLessonUrlTemplate: string; onLessonSelected?: (lessonSlug: string) => void; onLessonPreviewed?: (lessonSlug: string) => void; }; declare const LessonListingView: ({ browseData, programmeSlug, unitData, programmeFields, headerLeftSlot, programmeUrlTemplate, pupilLessonUrlTemplate, onLessonSelected, onLessonPreviewed, }: Props$5) => React.JSX.Element; type Props$4 = { yearSlug?: string; programmes: Programme[]; baseSlug: string; programmeUrlTemplate: string; backUrlTemplate: string; getAvailableProgrammeFactorAction: (args: { factorPrefix: "tier" | "examboard" | "pathway"; programmes: programme[]; }) => Promise; onOptionSelected?: (factorType: "tier" | "examboard" | "pathway", factor: FactorData) => void; }; declare const OptionsView: ({ yearSlug, programmes, baseSlug, programmeUrlTemplate, backUrlTemplate, getAvailableProgrammeFactorAction, onOptionSelected, }: Props$4) => React.JSX.Element; type Props$3 = { subjects: Subject[]; optionsUrlTemplate: string; unitsUrlTemplate: string; onSubjectSelected?: (subject: Subject) => void; }; declare const SubjectsPageView: ({ subjects, optionsUrlTemplate, unitsUrlTemplate, onSubjectSelected, }: Props$3) => React.JSX.Element; type Props$2 = { yearSlug: string; programmeUnits: Unit[][]; programmeData: ProgrammeFields; subjectsUrlTemplate: string; headerLeftSlot?: React.ReactElement; children?: React.ReactElement; }; declare const UnitsListingView: ({ programmeUnits, programmeData, yearSlug, subjectsUrlTemplate, headerLeftSlot, children, }: Props$2) => React.JSX.Element; type Props$1 = { children: React.ReactNode; courseId: string; itemId: string; addOnToken: string; }; declare const OakGoogleClassroomProvider: ({ children, courseId, itemId, addOnToken, }: Props$1) => React.ReactNode; type Props = { units: Unit[][]; programmeSlug: string; unitsLessonListUrlTemplate: string; onUnitSelected?: (unit: Unit) => void; }; declare const UnitCards: ({ units, programmeSlug, unitsLessonListUrlTemplate, onUnitSelected, }: Props) => React.JSX.Element; /** * Determines if the browser is in Google Classroom * based on URL search parameters. */ declare function isClassroomAssignment(searchParams: URLSearchParams | null): boolean; type Lesson = { unitSlug: string; lessonSlug: string; programmeSlug: string; title: string; unitTitle: string; maxPoints: number; }; type UserSlice = { userProfilePicUrl?: string; googleLoginHint?: string; setUser: (profilePicUrl?: string) => void; setGoogleLoginHint: (loginHint: string) => void; }; type BrowseSlice = { lessons: Lesson[]; setLessons: (lessons: Lesson[]) => void; unsetLessons: () => void; lessonSelected: boolean; setLessonSelected: () => void; isGradeSynced?: boolean; toggleGradeSync: (isSynced: boolean) => void; }; type AddonSlice = { courseId?: string; itemId?: string; addOnToken?: string; isInitialised: boolean; initialiseAddon: (courseId: string, itemId: string, addOnToken: string) => void; }; type GoogleClassroomAddonStore = UserSlice & BrowseSlice & AddonSlice; declare const useGoogleClassroomAddonStore: zustand.UseBoundStore>; export { AuthCookieKeys, BrowseLayout, GoogleClassroomAuthSuccessView, GoogleClassroomBrowseView, GoogleSignInView, LessonListingView, OakGoogleClassroomProvider, OptionsView, SubjectsPageView, UnitCards, UnitsListingView, WithGoogleClassroomAuth, isClassroomAssignment, useGoogleClassroomAddonStore }; export type { FactorData, LessonListItem, NewAttachment, OnLessonAttachedData, Programme, ProgrammeFields, Subject, Unit, UnitData, Year };