import "../styles/globals.css";
import "../../node_modules/prism-themes/themes/prism-dracula.css";
import React from "react";
import { PagePropsType } from "@/src/types";
import {
    BunextRootComponentProps,
    BunextHTMLProps,
    BunextRouteConfig,
    BunextPageModuleMeta,
} from "@moduletrace/bunext/types";
import { RootHead } from "./(partials)/root-head";

export type AppContextType = {
    pageProps: PagePropsType;
    query?: any;
    url?: URL;
};

export const AppContext = React.createContext<AppContextType>({
    pageProps: {},
});

export default function TbenPersonalSite({
    children,
    props,
    query,
    url,
}: BunextRootComponentProps) {
    return (
        <AppContext.Provider value={{ pageProps: props || {}, query, url }}>
            {children as any}
        </AppContext.Provider>
    );
}

export const html_props: BunextHTMLProps = {
    lang: "en",
    className: "dark",
};

export const config: BunextRouteConfig = {
    cacheExpiry: 60 * 60, // 1 hour
    cachePage: true,
};

export const meta: BunextPageModuleMeta = {
    title: `10X Devops/SRE Engineer | Tben.me`,
    description:
        "Software Engineer, DevOps Engineer, Full Stack Developer, Software Architect, Philosopher, Solar Energy Enthusiast.",
};

export const Head = RootHead;
