import { Box, Skeleton } from "@mui/material"; import type { MapSkeletonVariant } from "./mapComponentSkeletonConfig"; const skeletonSx = { transform: "none", bgcolor: "rgba(37, 125, 212, 0.10)", "&::after": { background: "linear-gradient(90deg, transparent, rgba(37, 125, 212, 0.12), transparent)", }, "@media (prefers-reduced-motion: reduce)": { animation: "none", "&::after": { animation: "none", }, }, } as const; const Line = ({ width = "44%", height = 18 }: { width?: string; height?: number }) => ( ); const Field = () => ( ); const TwoColumns = ({ children }: { children: React.ReactNode }) => ( {children} ); const Action = ({ width = "100%", height = 40, testId, }: { width?: string; height?: number; testId?: string; }) => ( ); const Notice = ({ testId }: { testId?: string }) => ( ); const SelectionHeader = ({ actionWidth = "34%" }: { actionWidth?: string }) => ( ); const EmptySelection = ({ height = 44 }: { height?: number }) => ( ); const Divider = () => ( ); const AdvancedRow = ({ testId }: { testId?: string }) => ( ); const SelectionList = ({ rows = 3 }: { rows?: number }) => ( {Array.from({ length: rows }, (_, index) => ( ))} ); const AnalysisFormSkeleton = ({ variant }: { variant: MapSkeletonVariant }) => { switch (variant) { case "burst-detection": return ( <> ); case "burst-location": return ( <> ); case "burst-simulation": return ( <> ); case "contaminant-simulation": return ( <> {Array.from({ length: 4 }, (_, index) => ( ))} ); case "dma-leak-detection": return ( <> {Array.from({ length: 5 }, (_, index) => ( ))} ); case "flushing-analysis": return ( <> ); case "monitoring-place-optimization": return ( <> {Array.from({ length: 5 }, (_, index) => ( ))} ); default: return null; } }; const DeviceListSkeleton = ({ cleaning }: { cleaning: boolean }) => ( {Array.from({ length: 3 }, (_, index) => ( ))} {cleaning && ( )} ); const RiskChartSkeleton = () => ( {[36, 58, 44, 76, 62, 84].map((height, index) => ( ))} ); export function MapPageSkeletonContent({ variant, }: { variant: MapSkeletonVariant; }) { if (variant === "network-simulation") { return ; } if (variant === "scada-data-cleaning") { return ; } if (variant === "health-risk-analysis") { return ; } return ( ); } export function MapTimelineSkeleton() { return ( {Array.from({ length: 5 }, (_, index) => ( ))} ); }