import React from 'react'; import PropTypes from 'prop-types'; import { useI18nContext } from '../../../../hooks/useI18nContext'; import Box from '../../../ui/box/box'; import Popover from '../../../ui/popover'; import { AvatarIcon, Button, BUTTON_LINK_SIZES, BUTTON_PRIMARY_SIZES, BUTTON_VARIANT, ButtonLink, IconName, IconSize, Text, } from '../../../component-library'; import { AlignItems, BackgroundColor, BLOCK_SIZES, DISPLAY, FontWeight, IconColor, JustifyContent, TextVariant, } from '../../../../helpers/constants/design-system'; import { useScrollRequired } from '../../../../hooks/useScrollRequired'; import { TERMS_OF_USE_LINK } from '../../../../../shared/constants/terms'; export default function SnapPrivacyWarning({ onAccepted, onCanceled }) { const t = useI18nContext(); const { isScrollable, isScrolledToBottom, scrollToBottom, ref, onScroll } = useScrollRequired(); return ( {t('thirdPartySoftware')} {t('snapsPrivacyWarningFirstMessage', [  {t('snapsTermsOfUse')}  , ])} {t('snapsPrivacyWarningSecondMessage')} {t('snapsPrivacyWarningThirdMessage')} {isScrollable && !isScrolledToBottom ? ( ) : null} ); } SnapPrivacyWarning.propTypes = { /** * onAccepted handler */ onAccepted: PropTypes.func.isRequired, /** * onCanceled handler */ onCanceled: PropTypes.func.isRequired, };