27 lines
947 B
TypeScript
27 lines
947 B
TypeScript
import type { User } from '@halo-dev/api-client';
|
|
import { createContext } from '@lit/context';
|
|
import type { ToastManager } from '../lit-toast';
|
|
import type { ConfigMapData } from '../types';
|
|
|
|
export const baseUrlContext = createContext<string>(Symbol('baseUrl'));
|
|
export const kindContext = createContext<string>(Symbol('kind'));
|
|
export const groupContext = createContext<string>(Symbol('group'));
|
|
export const nameContext = createContext<string>(Symbol('name'));
|
|
export const versionContext = createContext<string>(Symbol('version'));
|
|
|
|
export const allowAnonymousCommentsContext = createContext<boolean>(
|
|
Symbol('allowAnonymousComments')
|
|
);
|
|
|
|
export const currentUserContext = createContext<User | undefined>(
|
|
Symbol('currentUser')
|
|
);
|
|
|
|
export const toastContext = createContext<ToastManager | undefined>(
|
|
Symbol('toastContext')
|
|
);
|
|
|
|
export const configMapDataContext = createContext<ConfigMapData | undefined>(
|
|
Symbol('configMapData')
|
|
);
|