import React, { useState } 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, IconColor, JustifyContent, TextVariant, } from '../../../../helpers/constants/design-system'; export default function SnapPrivacyWarning({ onAccepted, onCanceled }) { const t = useI18nContext(); const [isDescriptionOpen, setIsDescriptionOpen] = useState(false); const handleReadMoreClick = () => { setIsDescriptionOpen(true); }; return ( {t('thirdPartySoftware')} {t('snapsPrivacyWarningFirstMessage')} {!isDescriptionOpen && ( <> {t('snapsPrivacyWarningSecondMessage')} {t('click')}  {t('here')}  {t('forMoreDetails')} )} {isDescriptionOpen && ( <> {t('snapsThirdPartyNoticeReadMorePartOne')} {t('snapsThirdPartyNoticeReadMorePartTwo')} {t('snapsThirdPartyNoticeReadMorePartThree')} )} ); } SnapPrivacyWarning.propTypes = { /** * onAccepted handler */ onAccepted: PropTypes.func.isRequired, /** * onCanceled handler */ onCanceled: PropTypes.func.isRequired, };