"use client";
import { PanelLoadingState } from "@/components/panel-loading-state";
import type { FileTreeNode } from "@/lib/types/backend";
import { WorkspaceUnavailable } from "./workspace-unavailable";
import { t } from "@/lib/i18n";
type RenderSessionOrLoadStateInput = {
isSessionFailed: boolean;
sessionError: string | null | undefined;
loadState: string;
isLoadingTree: boolean;
tree: FileTreeNode | null;
loadError: string | null;
onRetry: () => void;
};
export function renderSessionOrLoadState({
isSessionFailed,
sessionError,
loadState,
isLoadingTree,
tree,
loadError,
onRetry,
}: RenderSessionOrLoadStateInput) {
if (isSessionFailed) {
return