/** * External dependencies */ import { __ } from '@wordpress/i18n'; import { Icon, moreVertical, edit, cog } from '@wordpress/icons'; import { Dropdown, Button, MenuGroup, MenuItem } from '@wordpress/components'; import { getAdminLink, getSetting } from '@woocommerce/settings'; import classnames from 'classnames'; /** * Internal dependencies */ import './style.scss'; import { SiteVisibilityTour } from '../tour'; import { useSiteVisibilityTour } from '../tour/use-site-visibility-tour'; import { COMING_SOON_PAGE_EDITOR_LINK } from '../constants'; export const LaunchYourStoreStatus = ( { comingSoon, storePagesOnly } ) => { const isComingSoon = comingSoon && comingSoon === 'yes'; const isStorePagesOnly = isComingSoon && storePagesOnly && storePagesOnly === 'yes'; const comingSoonText = isStorePagesOnly ? __( 'Store coming soon', 'woocommerce' ) : __( 'Site coming soon', 'woocommerce' ); const liveText = __( 'Live', 'woocommerce' ); const dropdownText = isComingSoon ? comingSoonText : liveText; const { showTour, setShowTour, onClose, shouldTourBeShown } = useSiteVisibilityTour(); return (
{ shouldTourBeShown && showTour && ( { onClose(); setShowTour( false ); } } /> ) }
( ) } renderContent={ () => ( <> { __( 'Manage site visibility', 'woocommerce' ) } { isComingSoon && getSetting( 'currentThemeIsFSETheme' ) && ( { __( 'Customize "Coming soon" page', 'woocommerce' ) } ) } ) } />
); };