/** * External dependencies */ import { __ } from '@wordpress/i18n'; import classNames from 'classnames'; import { Button } from '@wordpress/components'; import { getNewPath } from '@woocommerce/navigation'; /** * Internal dependencies */ import { Intro } from '.'; export const BaseIntroBanner = ( { bannerTitle, bannerText, bannerClass, buttonIsLink, bannerButtonOnClick, bannerButtonText, children, }: { bannerTitle: string; bannerText: string; bannerClass: string; buttonIsLink?: boolean; bannerButtonOnClick?: () => void; bannerButtonText?: string; children?: React.ReactNode; } ) => { return (

{ bannerTitle }

{ bannerText }

{ bannerButtonText ? ( ) : null } { children }
); }; export const NetworkOfflineBanner = () => { return ( {} } /> ); }; export const JetpackOfflineBanner = ( { sendEvent, }: { sendEvent: React.ComponentProps< typeof Intro >[ 'sendEvent' ]; } ) => { return ( { sendEvent( { type: 'JETPACK_OFFLINE_HOWTO', } ); } } bannerButtonText={ __( 'Find out how', 'woocommerce' ) } /> ); }; export const ExistingThemeBanner = ( { setOpenDesignChangeWarningModal, }: { setOpenDesignChangeWarningModal: ( arg0: boolean ) => void; } ) => { return ( { setOpenDesignChangeWarningModal( true ); } } bannerButtonText={ __( 'Design with AI', 'woocommerce' ) } /> ); }; export const DefaultBanner = ( { sendEvent, }: { sendEvent: React.ComponentProps< typeof Intro >[ 'sendEvent' ]; } ) => { return ( { sendEvent( { type: 'DESIGN_WITH_AI', } ); } } bannerButtonText={ __( 'Design with AI', 'woocommerce' ) } /> ); }; export const ThemeHasModsBanner = ( { setOpenDesignChangeWarningModal, }: { setOpenDesignChangeWarningModal: ( arg0: boolean ) => void; } ) => { return ( { setOpenDesignChangeWarningModal( true ); } } bannerButtonText={ __( 'Design with AI', 'woocommerce' ) } /> ); }; export const ExistingAiThemeBanner = ( { setOpenDesignChangeWarningModal, }: { setOpenDesignChangeWarningModal: ( arg0: boolean ) => void; } ) => { return ( { window.location.href = getNewPath( {}, '/customize-store/assembler-hub', {} ); } } bannerButtonText={ __( 'Customize', 'woocommerce' ) } > ); };