/* eslint-disable @woocommerce/dependency-group */ /* eslint-disable @typescript-eslint/ban-ts-comment */ /** * External dependencies */ import { __ } from '@wordpress/i18n'; import { getSetting } from '@woocommerce/settings'; import { recordEvent } from '@woocommerce/tracks'; import { Button, Modal, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore No types for this exist yet. __unstableMotion as motion, } from '@wordpress/components'; /** * Internal dependencies */ import { SiteHub } from '../assembler-hub/site-hub'; import { ADMIN_URL } from '~/utils/admin-settings'; import './style.scss'; import { navigateOrParent } from '../utils'; import { WooCYSSecondaryButtonSlot } from './secondary-button-slot'; import { SurveyForm } from './survey-form'; import lessonPlan from '../assets/icons/lesson-plan.js'; import { Icon, brush, tag } from '@wordpress/icons'; export * as actions from './actions'; export * as services from './services'; export type events = { type: 'GO_BACK_TO_HOME' } | { type: 'COMPLETE_SURVEY' }; export const Transitional = ( { sendEvent, hasCompleteSurvey, isWooExpress, isSurveyOpen, setSurveyOpen, aiOnline, }: { sendEvent: ( event: events ) => void; hasCompleteSurvey: boolean; isWooExpress: boolean; isSurveyOpen: boolean; setSurveyOpen: ( isOpen: boolean ) => void; aiOnline: boolean; } ) => { const homeUrl: string = getSetting( 'homeUrl', '' ); const closeSurvey = () => { setSurveyOpen( false ); }; const showSurveyButton = ! hasCompleteSurvey; const showAISurvey = isWooExpress && aiOnline; return (
{ isSurveyOpen && ( closeSurvey() } shouldCloseOnClickOutside={ false } className="woocommerce-ai-survey-modal" > { sendEvent( { type: 'COMPLETE_SURVEY', } ); closeSurvey(); } } closeFunction={ closeSurvey } /> ) }

{ __( 'Your store looks great!', 'woocommerce' ) }

{ __( "Congratulations! You've successfully designed your store. Take a look at your hard work before continuing to set up your store.", 'woocommerce' ) }

{ showSurveyButton && ( ) }

{ __( "What's next?", 'woocommerce' ) }

{ __( 'Add your products', 'woocommerce' ) }

{ __( 'Start stocking your virtual shelves by adding or importing your products, or edit the sample products.', 'woocommerce' ) }

{ __( 'Fine-tune your design', 'woocommerce' ) }

{ __( 'Head to the Editor to change your images and text, add more pages, and make any further customizations.', 'woocommerce' ) }

{ __( 'Continue setting up your store', 'woocommerce' ) }

{ __( 'Go back to the Home screen to complete your store setup and start selling', 'woocommerce' ) }

); };