/** * External dependencies */ import { Card, CardBody, Button, CardDivider } from '@wordpress/components'; import { useState } from '@wordpress/element'; import { WooPaymentMethodsLogos } from '@woocommerce/onboarding'; /** * Internal dependencies */ import { getAdminSetting } from '~/utils/admin-settings'; import sanitizeHTML from '~/lib/sanitize-html'; import WooPaymentsLogo from './woopayments.svg'; import ExitSurveyModal from './exit-survey-modal'; import strings from './strings'; interface Props { isSubmitted: boolean; handleSetup: () => void; } const Banner: React.FC< Props > = ( { isSubmitted, handleSetup } ) => { const { first_name } = getAdminSetting( 'currentUserData', {} ); const { description, cta_label, tc_url } = getAdminSetting( 'wcpayWelcomePageIncentive' ); const [ isNoThanksClicked, setNoThanksClicked ] = useState( false ); const [ isExitSurveyModalOpen, setExitSurveyModalOpen ] = useState( false ); const isWooPayEligible = getAdminSetting( 'isWooPayEligible' ); const handleNoThanks = () => { setNoThanksClicked( true ); setExitSurveyModalOpen( true ); }; return ( WooPayments logo

{ strings.heading( first_name ) }

{ strings.limitedTimeOffer }

*' ) } />

{ isWooPayEligible ? strings.TosAndPpWooPay : strings.TosAndPp }

{ strings.termsAndConditions( tc_url ) }

{ strings.paymentOptions }

{ isExitSurveyModalOpen && ( ) } ); }; export default Banner;