<?php

namespace BwWinnersGlobalSite;

if ( ! class_exists( __NAMESPACE__ . '\Sync' ) ) {

	class Sync {

		public function __construct( $plugin_helpers ) {

			require_once plugin_dir_path( PLUGIN_PATH ) . 'includes/sync/class-google-sync.php';
			require_once plugin_dir_path( PLUGIN_PATH ) . 'includes/sync/class-google-sync-tasks.php';
			require_once plugin_dir_path( PLUGIN_PATH ) . 'includes/sync/class-auto-sync-cron.php';

			$google_sync = new \BwWinnersGlobalSite\Sync\Google_Sync();

			$plugin_helpers->google_sync = $google_sync;

			$google_sync_tasks = new \BwWinnersGlobalSite\Sync\Google_Sync_Tasks( $google_sync );

			$plugin_helpers->google_sync_tasks = $google_sync_tasks;
			
			$auto_sync_cron = new \BwWinnersGlobalSite\Sync\Auto_Sync_Cron( $google_sync_tasks );

			$plugin_helpers->auto_sync_cron = $auto_sync_cron;
		}
	}
}
