import React, { useState } from "react"; import { CartBagIcon, ExpandIcon, IndicationArrow, SimulationStatusIcon, } from "../../icons/SimulationIcons"; import { usePlayButtonStore } from "../../../store/usePlayButtonStore"; interface AssetDetailsCardInterface { name: string; status: string; count?: number; totalCapacity?: number; assetDetails?: { assetName: string; const: string; performance: string; }; } const GetStatus = (status: string) => { // "idle" | "running" | "stopped" | "disabled" | "error" switch (status) { case "idle": return (
Idle
); case "running": return (
Running
); case "stopped": return (
Stopped
); } }; const AssetDetailsCard: React.FC = ({ name, status, count, totalCapacity, assetDetails, }) => { const [moreDetails, setMoreDetails] = useState(false); // hooks const { isPlaying } = usePlayButtonStore(); return (
{name}
{GetStatus(status)}
{totalCapacity && (
{count?.toString()}
)} {status === "running" && (
)}
); }; export default AssetDetailsCard;