<?php

namespace Simplyin\Simplyin_W_Plugin;

use Simplyin\Simplyin_W_Plugin\Admin\SimplyIn_Admin;
use Simplyin\Simplyin_W_Plugin\Sync\Simplyin_Sync;

class Legacy_App {

	/**
	 * The unique identifier of this plugin.
	 *
	 * @var      string $plugin_name The string used to uniquely identify this
	 *     plugin.
	 * @since    1.0.0
	 * @access   protected
	 */
	protected string $plugin_name;

	/**
	 * The current version of the plugin.
	 *
	 * @var      string $version The current version of the plugin.
	 * @since    1.0.0
	 * @access   protected
	 */
	protected string $version;

	/**
	 * @var Simplyin_Sync
	 */
	public Simplyin_Sync $sync;

	public function __construct() {
		$this->plugin_name = 'simplyin';
		$this->version     = SimplyInGetPluginVersion();

		$this->define_admin_hooks();
		$this->define_sync_hooks();
	}

	private function define_admin_hooks(): void {

		new SimplyIn_Admin( $this->get_plugin_name(), $this->get_version() );
	}

	private function define_sync_hooks(): void {
		$this->sync = new Simplyin_Sync(
			$this->get_plugin_name(),
			$this->get_version()
		);
	}

	public function run(): void {
	}

	public function get_plugin_name(): string {
		return $this->plugin_name;
	}

	public function get_version(): string {
		return $this->version;
	}
}
