import { __, isRTL } from '@wordpress/i18n'; import { Icon, chevronRight, chevronLeft } from '@wordpress/icons'; import classNames from 'classnames'; import { playIcon, restartIcon, toursIcon, } from '@help-center/components/tours/icons'; import { useGlobalSyncStore } from '@help-center/state/globals-sync'; import { useTourStore } from '@help-center/state/tours'; import tours from '@help-center/tours/tours'; export const ToursDashboard = ({ onOpen, classes }) => { const { startTour } = useTourStore(); const { setVisibility } = useGlobalSyncStore(); const availableTours = Object.values(tours).filter( (tour) => tour.settings.startFrom.includes(window.location.href) || !tour.settings.startFrom, ); return (
{availableTours.length > 0 && ( )}
); }; export const Tours = () => { const { wasCompleted, startTour } = useTourStore(); const { setVisibility } = useGlobalSyncStore(); return (
); }; export const routes = [ { slug: 'tours', title: __('Tours', 'extendify-local'), component: Tours, }, ];