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