import { DefaultLabels, Maybe, UI, UI_LAYER } from '@usercentrics/cmp-browser-sdk'; import type { InitOptions, Category, UserDecision } from '@usercentrics/cmp-browser-sdk'; export type Status = | 'initializing' | 'initialized' | 'initializing_failed' | 'updating' | 'updated' | 'updating_failed'; export interface UsercentricsHandlers { accept: (userDecisions: UserDecision[]) => Promise; acceptAll: () => Promise; denyAll: () => Promise; setActiveLayer: (layer: UI_LAYER) => void; } export type Appearance = 'wall' | 'banner'; // edit the type if new tests will be defined export type AbTestValue = Record; export interface ContextValue { activeLayer: UI_LAYER; appearance: Appearance; categories: Category[]; handlers: UsercentricsHandlers | null; showCloseAndAcceptAllButton?: boolean; settings: Maybe | null; settingsLabels: DefaultLabels | null; status: Status; locale: string; abTestValue: AbTestValue | undefined; consentEventName: string; } export interface UsercentricsProviderProps { disabled?: boolean; settingsId: string; options?: InitOptions & { appearance?: Appearance; showCloseAndAcceptAllButton?: boolean }; abTestValue?: AbTestValue; consentEventName?: string; activeLayer?: UI_LAYER; loadingUI?: () => JSX.Element; } export interface State { activeLayer: UI_LAYER; categories: Category[]; settings: Maybe | null; settingsLabels: DefaultLabels | null; status: Status; }