"use client"; import { Globe, Loader2, Plug, Trash2 } from "@/components/icons/platform-icons"; type ConfiguredShare = { id: string; host: string; share: string; mountPath: string; isMounted: boolean; }; type NetworkStorageGridProps = { configuredShares: ConfiguredShare[]; discoveredServers: string[]; isBusy: boolean; isDiscovering: boolean; selectedHost: string; onMount: (id: string) => void; onRemove: (id: string) => void; onSelectServer: (host: string) => void; onUnmount: (id: string) => void; }; export function NetworkStorageGrid({ configuredShares, discoveredServers, isBusy, isDiscovering, selectedHost, onMount, onRemove, onSelectServer, onUnmount, }: NetworkStorageGridProps) { const hasContent = discoveredServers.length > 0 || configuredShares.length > 0; if (isDiscovering && !hasContent) { return (
Scanning network...
); } if (!hasContent) { return (
No servers or shares found. Try rescanning the network.
); } const hasDiscovered = discoveredServers.length > 0; const hasConfigured = configuredShares.length > 0; return (
{hasDiscovered && (

Discovered on network

{discoveredServers.map((server) => (
{server}
SMB server
))}
)} {hasConfigured && (

Configured shares

{configuredShares.map((share) => (
{share.host}/{share.share}
Mounted at /{share.mountPath}
{share.isMounted ? ( ) : ( )}
))}
)}
); }