/** * External dependencies */ import { Button } from '@wordpress/components'; import { useState } from '@wordpress/element'; import { WCPayConnectCard } from '@woocommerce/onboarding'; /** * Internal dependencies */ import { getAdminSetting } from '~/utils/admin-settings'; import sanitizeHTML from '~/lib/sanitize-html'; 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 wccomSettings = getAdminSetting( 'wccomHelper', {} ); const handleNoThanks = () => { setNoThanksClicked( true ); setExitSurveyModalOpen( true ); }; return ( <>
{ strings.limitedTimeOffer }

*' ) } />

{ strings.TosAndPp }

{ strings.termsAndConditions( tc_url ) }

} firstName={ first_name } businessCountry={ wccomSettings?.storeCountry ?? '' } isWooPayEligible={ isWooPayEligible } showNotice={ true } /> { isExitSurveyModalOpen && ( ) } ); }; export default Banner;