import type { JSXElement } from "solid-js";
import { TableOfContents } from "@/partials/TableOfContents";
import { PrevNextLinks } from "@/components/PrevNextLinks";
import { usePageContext } from "vike-solid/usePageContext";
import { readingTime } from "reading-time-estimator";
import { collectSections } from "@/libs/sections";
import { clock } from "solid-heroicons/outline";
import { navigation } from "@/libs/navigation";
import { Prose } from "@/components/Prose";
import { MDXProvider } from "solid-jsx";
import { createSignal } from "solid-js";
import { Icon } from "solid-heroicons";
type DocsLayoutProps = {
children: JSXElement;
};
export function DocsLayout(props: DocsLayoutProps) {
const {
exports: { frontmatter, readingTime },
} = usePageContext();
return (
{/* */}
);
}
type DocsHeaderProps = {
title?: string;
estimatedReadingTime?: string;
};
export function DocsHeader(props: DocsHeaderProps) {
const { urlPathname } = usePageContext();
const section = navigation.find((section) =>
section.links.find((link) => link.href === urlPathname),
);
if (!props.title && !section) {
return null;
}
return (
);
}