/* Copyright 2026 Marimo. All rights reserved. */
import { Panel, PanelGroup } from "react-resizable-panels";
import { useAtomValue } from "jotai";
import { MarimoIcon } from "@/components/icons/marimo-icons";
import type { AppConfig } from "@/core/config/config-schema";
import { Constants } from "@/core/constants";
import { resolveLayoutType, useLayoutState } from "@/core/layout/state";
import { RunApp } from "@/core/run-app";
import { runtimeAdapterAtom } from "@/core/runtime/adapter";
import { ContextAwarePanel } from "../editor/chrome/panels/context-aware-panel/context-aware-panel";
import { PanelsWrapper } from "../editor/chrome/wrapper/panels";
import { StaticBanner } from "../static-html/static-banner";
interface Props {
appConfig: AppConfig;
}
const RunPage = (props: Props) => {
const runtimeKind = useAtomValue(runtimeAdapterAtom).kind;
const isExportedNotebook = runtimeKind === "static" || runtimeKind === "wasm";
const { selectedLayout } = useLayoutState();
const finalLayout = resolveLayoutType({
selectedLayout,
isReading: true,
searchParams: new URLSearchParams(window.location.search),
});
const isExportedSlides = isExportedNotebook && finalLayout === "slides";
return (