/** * External dependencies */ import { Card, CardBody, Button, CardDivider } from '@wordpress/components'; import { useState } from '@wordpress/element'; /** * 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 PaymentMethods from './payment-methods'; 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 handleNoThanks = () => { setNoThanksClicked( true ); setExitSurveyModalOpen( true ); }; return ( WooPayments logo

{ strings.heading( first_name ) }

{ strings.limitedTimeOffer }

*' ) } />

{ strings.TosAndPp }

{ strings.termsAndConditions( tc_url ) }

{ strings.paymentOptions }

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