// Copyright 2019-2020 @polkadot/extension-ui authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { AccountsContext, AuthorizeRequest, MetadataRequest, SigningRequest } from '@polkadot/extension-base/background/types'; import React from 'react'; import { AvailableThemes } from '.'; // eslint-disable-next-line @typescript-eslint/no-unused-vars const noop = (): void => undefined; const AccountContext = React.createContext({ accounts: [], hierarchy: [] }); const ActionContext = React.createContext<(to?: string) => void>(noop); const AuthorizeReqContext = React.createContext([]); const MediaContext = React.createContext(false); const MetadataReqContext = React.createContext([]); const SigningReqContext = React.createContext([]); const ThemeSwitchContext = React.createContext<(theme: AvailableThemes) => void>(noop); const ToastContext = React.createContext<({show: (message: string) => void})>({ show: noop }); export { AccountContext, ActionContext, AuthorizeReqContext, MediaContext, MetadataReqContext, SigningReqContext, ThemeSwitchContext, ToastContext };