import a from"react";import{ThemeDataContext as l}from"@redocly/theme/core/contexts";import{useBreadcrumbs as d,useCatalogClassic as g,useCurrentProduct as f,useGlobalData as o,useI18n as p,useI18nConfig as b,useL10n as C,useL10nConfig as h,usePageData as r,usePageSharedData as S,usePageVersions as P,usePreloadHistory as T,useProducts as D,useUserMenu as k,useSubmitFeedback as F,useTranslate as L,useSidebarSiblingsData as O,usePageProps as v,useUserTeams as E,useMarkdownText as M,useCodeHighlight as R,useLoadAndNavigate as w,useCatalog as x,useCatalogSort as y,useCatalogSearch as A,useFetchCatalogEntities as j,useFetchCatalogEntitiesRelations as I,useTelemetry as s}from"../../app/hooks";import{Link as H}from"../../app/Link";import{useFacetQuery as N,useSearch as U,useAiSearch as _}from"../../app/search";import{useSidebarItems as B}from"../../app/Sidebar/useSidebarItems";import{deepMerge as G}from"../../../utils/object/deep-merge";const Q=new Set(["title","description","seo","sidebar","excludeFromSearch","template","redirects","rbac","metadata","slug","codeSnippet","breadcrumbs","markdown","seo","navbar","footer","colorMode","feedback","navigation"]),V={useBreadcrumbs:d,useCatalog:x,useCatalogSort:y,useCatalogSearch:A,useFetchCatalogEntities:j,useFetchCatalogEntitiesRelations:I,useCatalogClassic:g,useCurrentProduct:f,useGlobalData:o,useSearch:U,useAiSearch:_,useFacetQuery:N,useI18n:p,useI18nConfig:b,useL10n:C,useL10nConfig:h,usePageData:r,usePageSharedData:S,usePageVersions:P,usePreloadHistory:T,useProducts:D,useUserMenu:k,useSidebarItems:B,useSidebarSiblingsData:O,useSubmitFeedback:F,useTranslate:L,useUserTeams:E,usePageProps:v,useMarkdownText:M,useCodeHighlight:R,useLoadAndNavigate:w,useTelemetry:s,useOtelTelemetry:s},W={LinkComponent:H};function $({children:n}){const{props:e}=r()||{},t=o()||{},u=a.useMemo(()=>{const c=Object.fromEntries(Object.entries(e?.frontmatter||{}).filter(([m])=>Q.has(m)));return G(t,c)},[t,e?.frontmatter]),i={hooks:V,components:W,config:u};return a.createElement(l.Provider,{value:i},n)}export{$ as ThemeDataProvider};
