/* eslint-disable jsx-a11y/no-static-element-interactions */
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable react/no-danger */
import { useBoolean } from "usehooks-ts";
import { Button } from "@/components/ui/button/button";
import { Checkbox } from "@/components/ui/checkbox/checkbox";
import {
Dialog,
DialogContent,
DialogFooter,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { useLocale } from "@/hooks/useLocale";
interface PolicyCheckProps {
value: boolean;
onChange: (value: boolean) => void;
renderLabelItem: (variables: { toggleModal: () => void }) => React.ReactNode;
renderModalItem: () => React.ReactNode;
renderModalTitle?: string;
showButton?: boolean;
}
const PolicyCheck = (props: PolicyCheckProps) => {
const boolean = useBoolean();
const { t } = useLocale();
return (
{
props.onChange(!props.value);
}}
/>
{props.renderLabelItem({ toggleModal: boolean.toggle })}
);
};
const KvkkLabel = (props: { onClick: () => void }) => {
const { t } = useLocale();
return (
{`*${t("Within the scope of processing your personal data")}, `}
{t("Clarification text")}
{` ${t("I have read and I approve.")}`}
);
};
const PaymentAgreementLabel = (props: { onClick: () => void }) => {
const { t } = useLocale();
return (
{`${t("Preliminary Information Form")} `}
ve{" "}
{`${t("Distance Sales Agreement")} `}
{t("I have read and I approve.")}
);
};
const PaymentAgreementModalContent = (props: {
saleAgreementText: string;
preSaleAgreementText: string;
}) => {
const { t } = useLocale();
return (
{t("Preliminary Information Form")}
{t("Distance Sales Agreement")}
);
};
const MasterpassLabel = (props: { onClick: () => void }) => {
const { t } = useLocale();
return (
{`*${t(
"I approve that my card information is stored with the Masterpass infrastructure. Click for detailed information.",
)}`}
{t("Click for detailed information.")}
);
};
PolicyCheck.KvkkLabel = KvkkLabel;
PolicyCheck.MasterpassLabel = MasterpassLabel;
PolicyCheck.PaymentAgreementLabel = PaymentAgreementLabel;
PolicyCheck.PaymentAgreementModalContent = PaymentAgreementModalContent;
export default PolicyCheck;