import { useHostDisplay, type HostDisplaySource } from '../transport/hosts/use-host-display' import type { DownloadProgressFeed } from './download-progress-feed' import { DownloadProgressBar, downloadedMegabytesCaption } from './DownloadProgressBar' import type { MobileWebShellSessionState } from './mobile-web-shell-session-contract' import { ShellWaitingFrame } from './ShellWaitingFrame' const DOWNLOADING_LABEL = 'Downloading the latest app' export function ShellDownloadProgress({ state, feed, host }: { state: Extract feed: DownloadProgressFeed host: HostDisplaySource | null }) { const hostTitle = useHostDisplay(host).title const source = host === null ? '' : `from ${hostTitle} ยท ` return ( } caption={`${source}${downloadedMegabytesCaption(state.receivedBytes, state.totalBytes)}`} /> ) }