import { jsx } from "react/jsx-runtime";
import React__default from "react";
const AppShell = ({
  children
}) => {
  React__default.useEffect(() => {
    const handleMessage = (event) => {
      if (event.data?.type === "THEME_CHANGE") {
        if (event.data.isDarkMode) {
          document.documentElement.classList.add("dark");
        } else {
          document.documentElement.classList.remove("dark");
        }
      }
    };
    window.addEventListener("message", handleMessage);
    return () => window.removeEventListener("message", handleMessage);
  }, []);
  return /* @__PURE__ */ jsx(
    "div",
    {
      style: {
        paddingTop: "env(safe-area-inset-top)",
        paddingBottom: "env(safe-area-inset-bottom)"
      },
      className: "has-[[data-variant='sidebar']]:lg:grid has-[[data-variant='sidebar']]:lg:grid-cols-[auto_1fr] has-[[data-variant='sidebar']]:lg:grid-rows-[minmax(100%,100vh)] has-[[data-variant='sidebar']]:lg:overflow-hidden\n      has-[[data-variant='sidebar']]:lg:[&_[data-component='tab-bar']]:hidden has-[[data-variant='top']]:md:[&_[data-component='tab-bar']]:hidden",
      children
    }
  );
};
export {
  AppShell
};
