import React from 'react'
import { WalletIcon } from '../../../icons/3dChartIcons'
import { useWidgetStore } from '../../../../store/useWidgetStore';

const TotalCardComponent = ({
    object
}: any) => {

    const { setSelectedChartId } =
        useWidgetStore();
    return (
        <>
            <div className="header-wrapper" onClick={() => {
                setSelectedChartId(object.id)
            }}>
                <div className="header">{object.header}</div>
                <div className="data-values">
                    <div className="value">{object.value}</div>
                    <div className="per">{object.per}</div>
                </div>
            </div>
            <div className="icon">
                <WalletIcon />
            </div>
        </>
    )
}

export default TotalCardComponent