"use client"; import { spacing } from "../../../../core/design-system/index.js"; import { Container } from "../../components/basic.js"; import { Link, Text } from "../../components/text.js"; import type { ConnectLocale } from "../locale/types.js"; /** * @internal */ export function TOS(props: { termsOfServiceUrl?: string; privacyPolicyUrl?: string; locale: ConnectLocale["agreement"]; requireApproval?: boolean; isApproved?: boolean; onApprove?: () => void; }) { const { termsOfServiceUrl, privacyPolicyUrl, locale, requireApproval } = props; if (!termsOfServiceUrl && !privacyPolicyUrl && !requireApproval) { return null; } const bothGiven = termsOfServiceUrl && privacyPolicyUrl; return ( {requireApproval && ( )} {locale.prefix}{" "} {termsOfServiceUrl && ( {" "} {locale.termsOfService}{" "} )} {bothGiven && `${locale.and} `} {privacyPolicyUrl && ( {locale.privacyPolicy} )} {!privacyPolicyUrl && !termsOfServiceUrl && ( Terms of Service and Privacy Policy )} ); }