/**
* External dependencies
*/
import React, { useState, useEffect } from '@wordpress/element';
import { Guide } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { recordEvent } from '@woocommerce/tracks';
/**
* Internal dependencies
*/
import { LineChartIllustration } from './illustrations/line-chart';
import { InboxIllustration } from './illustrations/inbox';
import { PieChartIllustration } from './illustrations/pie-chart';
import { PageContent } from './page-content';
import './style.scss';
const pages = [
{
image: ,
content: (
),
},
{
image: ,
content: (
),
},
{
image: ,
content: (
),
},
];
export const WelcomeModal = ( { onClose } ) => {
const [ guideIsOpen, setGuideIsOpen ] = useState( true );
useEffect( () => {
recordEvent( 'task_list_welcome_modal_open' );
}, [] );
return (
<>
{ guideIsOpen && (
{
setGuideIsOpen( false );
onClose();
recordEvent( 'task_list_welcome_modal_close' );
} }
className={ 'woocommerce__welcome-modal' }
finishButtonText={ __( "Let's go", 'woocommerce-admin' ) }
pages={ pages }
/>
) }
>
);
};