import * as React from 'react' import { Trans } from 'react-i18next' import { StyleSheet, Text, View } from 'react-native' import { SafeAreaView, useSafeAreaFrame } from 'react-native-safe-area-context' import AppAnalytics from 'src/analytics/AppAnalytics' import { InviteEvents } from 'src/analytics/Events' import BackButton from 'src/components/BackButton' import Button, { BtnSizes, BtnTypes } from 'src/components/Button' import CustomHeader from 'src/components/header/CustomHeader' import ShareIcon from 'src/icons/Share' import { navigate } from 'src/navigator/NavigationService' import { Screens } from 'src/navigator/Screens' import colors from 'src/styles/colors' import { typeScale } from 'src/styles/fonts' import { Spacing } from 'src/styles/styles' interface Props { title: string description?: string descriptionI18nKey?: string contactName?: string buttonLabel: string disabled: boolean helpLink?: string onClose(): void onShareInvite(): void } const InviteModal = ({ title, description, descriptionI18nKey, contactName, buttonLabel, disabled, helpLink, onClose, onShareInvite, }: Props) => { const { height, width } = useSafeAreaFrame() const onPressHelp = () => { if (helpLink) { AppAnalytics.track(InviteEvents.invite_help_link) navigate(Screens.WebViewScreen, { uri: helpLink }) } } return ( } /> {title} {description ? {description} : null} {descriptionI18nKey ? ( ) : null}