import { Box, Stack, useTheme } from "@mui/material"; interface SkeletonCardProps { width?: number | string | { xs?: number | string; md?: number | string }; showHalo?: boolean; } export const SkeletonCard = ({ width = { xs: 130, md: 216 }, showHalo = true, }: SkeletonCardProps) => { const theme = useTheme(); const pulseAnimation = { "@keyframes pulse": { "0%, 100%": { opacity: 1 }, "50%": { opacity: 0.72 }, }, }; const floatAnimation = { "@keyframes float": { "0%, 100%": { transform: "rotate(5deg) translate(12px, -20px)" }, "50%": { transform: "rotate(5deg) translate(12px, -24px)" }, }, }; const cardStyle = { width: width, height: 57, borderRadius: theme.shape.borderRadius, background: theme.palette.mode === "dark" ? theme.palette.secondary.dark : theme.palette.background.paper, boxShadow: theme.palette.mode === "dark" ? "0 8px 30px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.05) inset" : "0 8px 30px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.05) inset", display: "flex", gap: theme.spacing(5), alignItems: "center", padding: theme.spacing(5), }; const blockStyle = { width: 55, height: 34, borderRadius: theme.shape.borderRadius, background: theme.palette.secondary.main, border: `1px solid ${theme.palette.divider}`, animation: "pulse 1.6s ease-in-out infinite", ...pulseAnimation, }; const lineStyle = { height: 7, borderRadius: theme.shape.borderRadius, background: theme.palette.secondary.main, border: `1px solid ${theme.palette.divider}`, animation: "pulse 1.6s ease-in-out infinite", ...pulseAnimation, }; return ( {showHalo && (