import React from "react";
import Link from "next/link";
import Checkbox from "@/components/Low/Checkbox";

const useAcceptedTerms = () => {
	const [acceptedTerms, setAcceptedTerms] = React.useState(false);

	const renderCheckbox = () => (
		<Checkbox isChecked={acceptedTerms} onChange={setAcceptedTerms}>
			I agree to the
			<Link href={`https://encoach.com/terms`} className="text-mti-purple-light">
				{" "}
				Terms and Conditions
			</Link>{" "}
			and
			<Link href={`https://encoach.com/privacy-policy`} className="text-mti-purple-light">
				{" "}
				Privacy Policy
			</Link>
		</Checkbox>
	);

	return {acceptedTerms, renderCheckbox};
};

export default useAcceptedTerms;
