import { useContext } from 'react';

import type { DashboardContextModel } from '../../../../Store/Dashboard/dashboard-context';
import { DashboardContext } from '../../../../Store/Dashboard/dashboard-context';
import SingleInfoTab from '../Schema/SingleInfoTab';

const YourFundingChart = (): JSX.Element => {
	const dashboardContext: DashboardContextModel = useContext(DashboardContext);
	const { funding } = dashboardContext;
	return (
		<div>
			<SingleInfoTab
				price={funding}
				priceAsCurrency
				title="Your Funding"
				Icon={+funding < 0 ? 'TrendingDown' : 'TrendingUp'}
				Theme="green-to-red-gradient"
			/>
		</div>
	);
};

export default YourFundingChart;
