import { recordTracksEvent } from '@automattic/calypso-analytics'; import { BackButton, NextButton, SubTitle, Title } from '@automattic/onboarding'; import { useI18n } from '@wordpress/react-i18n'; import React, { useEffect } from 'react'; import { HintJetpackConnection } from './hint-jetpack-connection'; import { HintJetpackConnectionMovePlugin } from './hint-jetpack-connection-move-plugin'; import './style.scss'; export type NotAuthorizedType = | 'generic' | 'target-site-staging' | 'source-site-not-connected' | 'source-site-not-connected-move-plugin'; interface Props { type?: NotAuthorizedType; sourceSiteUrl?: string; targetSiteUrl?: string; startImport?: () => void; onBackToStart?: () => void; onStartBuilding?: () => void; onStartBuildingText?: string; } const NotAuthorized: React.FunctionComponent< Props > = ( props ) => { const { __ } = useI18n(); const { type = 'generic', sourceSiteUrl, targetSiteUrl, startImport, onBackToStart, onStartBuilding, onStartBuildingText, } = props; const startBuildingText = onStartBuildingText ?? __( 'Start building' ); useEffect( () => { recordTracksEvent( 'calypso_site_importer_unauthorized' ); }, [] ); return (