import { useTranslation } from "react-i18next";

export interface HomePageTemplateProps {
	buttonLabel: string;
	buttonOnClick: () => void;
	value: number;
}

const HomePageTemplate = (props: HomePageTemplateProps) => {
	const { t } = useTranslation();
	return (
		<div className="hero">
			<div className="hero-content prose flex-col">
				<h1>HomePage</h1>
				<div className="card card-bordered shadow-2xl bg-base-100 text-base-content items-center">
					<div className="card-body">
						{t("homePage.counter")}: {props.value}
					</div>
					<button
						className="btn btn-sm btn-accent absolute w-fit -bottom-4"
						onClick={props.buttonOnClick}
					>
						{props.buttonLabel}
					</button>
				</div>
			</div>
		</div>
	);
};

export default HomePageTemplate;
