"use client";

import { useState } from "react";
import Header from "./Header";
import Stats from "./stats";

export default () => {
	const [isChecked, setIsChecked] = useState(true);

	const handleCheckboxChange = (event: React.ChangeEvent<HTMLInputElement>) => {
		setIsChecked(event.target.checked);
	};

	return (
		<>
			<Header
				isChecked={isChecked}
				handleCheckboxChange={handleCheckboxChange}
			/>
			<div className="card bg-base-200 shadow-xl mb-4 col-span-6 xl:col-span-3">
				<Stats isChecked={isChecked} />
			</div>
		</>
	);
};
