import React from 'react'; import { __, sprintf } from '@wordpress/i18n'; import Modal from '@/components/Common/Modal'; import { TOUR_SECTIONS, getSectionById } from './tourSections'; interface ResumeTourModalProps { isOpen: boolean; lastSectionId: string; onSelectResume: ( sectionId: string ) => void; onSelectRestart: () => void; onClose: () => void; } const ResumeTourModal: React.FC = ({ isOpen, lastSectionId, onSelectResume, onSelectRestart, onClose }) => { const section = getSectionById( lastSectionId ) || TOUR_SECTIONS[0]; const sectionIndex = TOUR_SECTIONS.findIndex( ( s ) => s.id === section.id ); const sectionNumber = -1 !== sectionIndex ? sectionIndex + 1 : 1; const customHeader = (
{ section.icon || '🚀' }

{ __( 'Welcome back to the tour! 👋', 'burst-statistics' ) }

{ sprintf( /* translators: 1: current section number, 2: total sections */ __( 'Section %1$d of %2$d', 'burst-statistics' ), sectionNumber, TOUR_SECTIONS.length ) }
); const content = (

{ __( 'You have previous tour progress. Would you like to resume from where you left off or start fresh from the beginning?', 'burst-statistics' ) }

{ section.icon }
{ __( 'Resume target', 'burst-statistics' ) }
{ section.title }
{ section.description }
); const footer = (
); return ( ); }; export default ResumeTourModal;