import { createContext } from 'react';

import type { ThemeHooks } from '@redocly/theme/core/types';
import type { LinkProps } from '@redocly/theme/components/Link/Link';
import type { UiAccessibleConfig } from '@redocly/theme/config';

export interface ThemeDataTransferObject {
  hooks: ThemeHooks;
  components: {
    LinkComponent: (props: React.PropsWithChildren<LinkProps>) => JSX.Element;
  };
  config: UiAccessibleConfig;
}

export const ThemeDataContext = createContext<ThemeDataTransferObject | null>(null);
