import { ProgressBar, WordPressLogo } from '@automattic/components'; import { useFlowProgress } from '@automattic/onboarding'; import { useTranslate } from 'i18n-calypso'; import './style.scss'; interface ProgressBarData { flowName?: string; stepName?: string; } interface Props { progressBar?: ProgressBarData; shouldShowLoadingScreen?: boolean; rightComponent?: React.ReactNode; logoComponent?: React.ReactNode; pageTitle?: string; } const SignupHeader = ( { shouldShowLoadingScreen, rightComponent, logoComponent, progressBar = {}, pageTitle, }: Props ) => { const translate = useTranslate(); const VARIATION_TITLES: Record< string, string > = { videopress: translate( 'Video' ), }; const params = new URLSearchParams( window.location.search ); const variationName = params.get( 'variationName' ); const variationTitle = variationName && VARIATION_TITLES[ variationName ]; const showPageTitle = variationTitle || params.has( 'pageTitle' ) || Boolean( pageTitle ); const variablePageTitle = variationTitle || pageTitle || params.get( 'pageTitle' ); const flowProgress = useFlowProgress( variationName ? { flowName: variationName, stepName: progressBar.stepName } : progressBar ); const logoClasses = 'wordpress-logo'; return ( <>