/**
 * Copyright (c) 2023-present Plane Software, Inc. and contributors
 * SPDX-License-Identifier: AGPL-3.0-only
 * See the LICENSE file for details.
 */

import { observer } from "mobx-react";
import { Outlet } from "react-router";
import { ProjectsAppPowerKProvider } from "@/components/power-k/projects-app-provider";
import { ProjectShellTopToolbar } from "./project-shell-top-toolbar";

function WorkspaceLayout() {
  return (
    <>
      <ProjectsAppPowerKProvider />
      <div className="relative flex h-full w-full flex-col overflow-hidden rounded-lg border border-subtle">
        <div id="full-screen-portal" className="absolute inset-0 w-full" />
        <div className="relative flex size-full overflow-hidden">
          <main className="relative flex h-full w-full min-w-0 flex-col overflow-hidden bg-surface-1">
            <ProjectShellTopToolbar />
            <div className="relative flex min-h-0 w-full flex-1 overflow-hidden">
              <Outlet />
            </div>
          </main>
        </div>
      </div>
    </>
  );
}

export default observer(WorkspaceLayout);
