// __SDEFILE__ - This file is a dependency for the stand-alone environment
// Hooks
import { useState } from 'react'
import { useTranslation } from 'next-i18next'
// Components
import { Popout } from 'shared/components/popout/index.mjs'
import { Link } from 'shared/components/link.mjs'
import { GdprAccountDetails, ns as gdprNs } from 'shared/components/gdpr/details.mjs'
export const ns = ['gdpr', gdprNs]
const Checkbox = ({ value, setter, label, children = null }) => (
setter(value ? false : true)}
>
setter(value ? false : true)}
/>
{label}
{children}
)
export const ConsentForm = ({ submit }) => {
// State
const [details, setDetails] = useState(false)
const [consent1, setConsent1] = useState(false)
const [consent2, setConsent2] = useState(false)
// Hooks
const { t } = useTranslation(ns)
const giveConsent = () => {
setConsent1(true)
setConsent2(true)
}
return (
{t('gdpr:privacyMatters')}
{t('gdpr:compliant')}
{t('gdpr:consentWhyAnswer')}
{t('gdpr:accountQuestion')}
{details ?
: null}
{consent1 ? (
<>
>
) : (
)}
{consent1 && !consent2 ?
{t('openDataInfo')} : null}
{!consent1 &&
{t('gdpr:noConsentNoAccountCreation')}}
{consent1 && (
)}
FreeSewing Privacy Notice
)
}