import t from"react";import c from"styled-components";import{RedoclyGraphQLDocs as h}from"@redocly/graphql-docs";import{buildSchema as l}from"graphql";import{LayoutVariant as f}from"@redocly/theme/components/SidebarActions/SidebarActions";import{useThemeConfig as p}from"@redocly/theme/core/hooks";import{withPathPrefix as g}from"@redocly/theme/core/utils";import{ServerRoutes as E}from"../../../../constants/api.js";import{CLIENT_TELEMETRY_ENABLED as u}from"../../../../client/constants/common.js";import{PACKAGE_NAME as d}from"../../../../config/product-gates.js";import{envConfig as S}from"../../../config/env-config.js";import{usePageSharedData as L}from"../../../../client/providers/page-data/hooks.js";import{useCodeHighlight as R}from"../../../../client/app/hooks/codeHighlight/useCodeHighlight.js";function v({pageProps:o}){const e=L("graphQlSettings"),{settings:r}=o,{graphql:i}=p(),{highlight:n}=R(),m=t.useMemo(()=>({graphql:l(e)}),[e]),s=t.useMemo(()=>{const a={...i,...r};return{layout:o.apiOptions?.layout??f.THREE_PANEL,...a,markdown:{...a.markdown,highlight:n},navigation:{contentPrefix:""}}},[i,r,n,o.apiOptions?.layout]);return t.createElement(C,null,t.createElement(h,{schema:m,settings:s,telemetryConfig:{collectorUrl:new URL(g(E.OTEL_TRACES),location.origin).toString(),disabled:!u,serviceVersion:`${d}@${S.REDOCLY_PORTAL_VERSION}`}}))}const C=c.div`
  --navigation-anchor-offset: var(--navbar-height);
  --sidebar-width: 0px;
`;export{v as default};
