import { jsxs as p, jsx as e } from "react/jsx-runtime";
import { useEffect as f } from "react";
import { css as h, Global as d } from "@emotion/react";
import { CssBaseline as y } from "@mui/material";
import { createTheme as u } from "../Theme/theme.js";
import g from "../Theme/theme-provider.js";
function k(r, {
  mode: i = "light",
  pageWidth: n = "md",
  palette: s,
  typography: a
} = {}) {
  const o = u({ mode: i, pageWidth: n, palette: s, typography: a }), m = o.typography.color.main, l = h`
    font-family: ${o.typography.fontFamily};
    color: ${m};

    a,
    a:hover,
    a:active {
      text-decoration: none;
      color: ${o.palette.primary.dark};
    }

    a:hover {
      color: ${o.palette.primary.main};
    }

    .section--latest-post {
      p:last-of-type {
        margin: 0;
      }
    }

    .has-scrolled {
      .section--footnotes {
        position: static !important;
        transition-property: background-color;
        transition-duration: 600ms;
        transition-timing-function: ease;
        .footnote__title {
          color: #fff;
        }
      }
    }
  `;
  return function(c) {
    return f(() => {
      const t = document.querySelector("#jss-server-side");
      t && t.parentNode && t.parentNode.removeChild(t);
    }, []), /* @__PURE__ */ p(g, { theme: o, children: [
      /* @__PURE__ */ e(y, {}),
      /* @__PURE__ */ e(d, { styles: l }),
      /* @__PURE__ */ e(r, { ...c })
    ] });
  };
}
export {
  k as default
};
