/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
import { chevronLeft } from '@wordpress/icons';
import { createInterpolateElement, useState } from '@wordpress/element';
import { Button } from '@wordpress/components';
import { Link } from '@woocommerce/components';
/**
* Internal dependencies
*/
import { CustomizeStoreComponent } from '../types';
import { DesignChangeWarningModal } from './design-change-warning-modal';
import './intro.scss';
import { ADMIN_URL } from '~/utils/admin-settings';
export type events =
| { type: 'DESIGN_WITH_AI' }
| { type: 'CLICKED_ON_BREADCRUMB' }
| { type: 'SELECTED_BROWSE_ALL_THEMES' }
| { type: 'SELECTED_ACTIVE_THEME'; payload: { theme: string } }
| { type: 'SELECTED_NEW_THEME'; payload: { theme: string } };
export * as actions from './actions';
export * as services from './services';
export const Intro: CustomizeStoreComponent = ( { sendEvent, context } ) => {
const {
intro: { themeCards, activeThemeHasMods, customizeStoreTaskCompleted },
} = context;
const [ openDesignChangeWarningModal, setOpenDesignChangeWarningModal ] =
useState( false );
return (
<>
{ openDesignChangeWarningModal && (
{ createInterpolateElement(
__(
"The [AI designer*] will create a new store design for you, and you'll lose any changes you've made to your active theme. If you'd prefer to continue editing your theme, you can do so via the
{ __( 'Create a store that reflects your brand and business. Select one of our professionally designed themes to customize, or create your own using AI.', 'woocommerce' ) }
{ __( 'Design the look of your store, create pages, and generate copy using our built-in AI tools.', 'woocommerce' ) }
{ __( 'Or select a professionally designed theme to customize and make your own.', 'woocommerce' ) }