import { useState, useCallback } from 'react' import { __ } from '@wordpress/i18n' import './SummaryStep.scss' const HOW_TO_LINK = 'https://webba-booking.com/documentation/how-to-add-booking-form/' interface SummaryStepProps { shortcode?: string dashboardUrl: string onClose: () => void pluginUrl?: string } export const SummaryStep = ({ shortcode = '[webba_booking]', dashboardUrl, onClose, pluginUrl, }: SummaryStepProps) => { const iconSrc = pluginUrl ? `${pluginUrl}/public/images/icon-check-nobg.svg` : '' const [copied, setCopied] = useState(false) const handleCopy = useCallback(() => { navigator.clipboard.writeText(shortcode).then(() => { setCopied(true) setTimeout(() => setCopied(false), 2000) }) }, [shortcode]) return (
{iconSrc && ( success )}

{__('Great!', 'webba-booking-lite')}

{__( 'Now add the booking form to your website', 'webba-booking-lite' )}

{__( 'Your initial setup is configured and ready to go. Just embed the form below on your website.', 'webba-booking-lite' )}

{__('Embed your booking form', 'webba-booking-lite')}

{__( 'Paste this shortcode into any Page or Post where you want the form to appear.', 'webba-booking-lite' )}

{__( 'How to add Webba Booking form', 'webba-booking-lite' )}

{ e.preventDefault() onClose() }} > {__('Close Setup Wizard', 'webba-booking-lite')}
) }