import {Stack} from "@mui/material";import {Status_Chip} from "../common/status_chip";import type {Gallery_Plot_Snapshot} from "../session/gallery_plot_snapshot";
export function Plot_Status({snapshot,active}:{snapshot:Gallery_Plot_Snapshot;active:boolean}) {return <Stack direction="row" spacing={1}><Status_Chip state={active?"ready":"connecting"} label={active?"像素流活动":"非活动视图"}/><Status_Chip state={snapshot.connection_state} label={snapshot.protocol_error||({connecting:"连接中",ready:"WS 已连接",error:"连接错误",closed:"连接关闭"}[snapshot.connection_state])}/></Stack>;}
