"use client"; import { getStoreOperationActionLabel } from "@/lib/shared/store-operations"; import { getAppVisualState, type ActiveAppOperation, type AppItem, } from "@/modules/apps/components/app-grid-presenters"; import { Loader2 } from "@/components/icons/platform-icons"; import { Skeleton } from "@/components/ui/skeleton"; import { useState, type MouseEvent } from "react"; type AppGridContentProps = { activeAppId: string | null; activeOperationsCount: number; animationsEnabled: boolean; apps: AppItem[]; iconSize: "small" | "medium" | "large"; isAppsError: boolean; isAppsLoading: boolean; onAppContextMenu: (event: MouseEvent, app: AppItem) => void; onOpenApp: (app: AppItem) => void; primaryOperation: ActiveAppOperation | null; }; export function AppGridContent({ activeAppId, activeOperationsCount, animationsEnabled, apps, iconSize, isAppsError, isAppsLoading, onAppContextMenu, onOpenApp, primaryOperation, }: AppGridContentProps) { const [loadedImages, setLoadedImages] = useState>(new Set()); const iconContainerClass = iconSize === "small" ? "size-12 rounded-xl" : iconSize === "large" ? "size-16 rounded-3xl" : "size-14 rounded-2xl"; const iconGlyphClass = iconSize === "small" ? "size-6" : iconSize === "large" ? "size-8" : "size-7"; return ( <> {primaryOperation ? (

{getStoreOperationActionLabel(primaryOperation.action)}{" "} {primaryOperation.appName}

{activeOperationsCount > 1 ? `+${activeOperationsCount - 1} more` : `${primaryOperation.progressPercent}%`}
) : null} {isAppsLoading && apps.length === 0 ? (

Syncing containers

{/* Skeleton placeholder icons that match the real grid layout */}
) : isAppsError && apps.length === 0 ? (

Connection failed

) : apps.length === 0 ? (