/** * External dependencies */ import { Button } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { ProgressBar } from '@woocommerce/components'; import { useState } from '@wordpress/element'; import { recordEvent } from '@woocommerce/tracks'; /** * Internal dependencies */ import { Look, designWithAiStateMachineContext } from '../types'; import { Choice } from '../components/choice/choice'; import { CloseButton } from '../components/close-button/close-button'; import { aiWizardClosedBeforeCompletionEvent } from '../events'; export type lookAndFeelCompleteEvent = { type: 'LOOK_AND_FEEL_COMPLETE'; payload: Look; }; export const LookAndFeel = ( { sendEvent, context, }: { sendEvent: ( event: lookAndFeelCompleteEvent | aiWizardClosedBeforeCompletionEvent ) => void; context: designWithAiStateMachineContext; } ) => { const choices = [ { title: __( 'Contemporary', 'woocommerce' ), key: 'Contemporary' as const, subtitle: __( 'Clean lines, neutral colors, sleek and modern look.', 'woocommerce' ), }, { title: __( 'Classic', 'woocommerce' ), key: 'Classic' as const, subtitle: __( 'Elegant and timeless with a nostalgic touch.', 'woocommerce' ), }, { title: __( 'Bold', 'woocommerce' ), key: 'Bold' as const, subtitle: __( 'Vibrant with eye-catching colors and visuals.', 'woocommerce' ), }, ]; const [ look, setLook ] = useState< Look >( context.lookAndFeel.choice === '' ? choices[ 0 ].key : context.lookAndFeel.choice ); return (