import React from 'react' import { ToastWithID } from '../use-toasts/toast-container' export type UpdateToastsFunction = (fn: (toasts: Array) => Array) => any export interface GeistUIContextParams { toasts: Array toastHovering: boolean updateToasts: UpdateToastsFunction updateToastHoverStatus: (fn: () => boolean) => void } const defaultParams: GeistUIContextParams = { toasts: [], toastHovering: false, updateToasts: t => t, updateToastHoverStatus: () => {}, } export const GeistUIContent: React.Context = React.createContext( defaultParams, ) export const useGeistUIContext = (): GeistUIContextParams => React.useContext(GeistUIContent)