<?php

namespace Blazemedia\OneSignal;

/**
 * Main plugin class
 */
class Plugin
{
    /**
     * Plugin version
     */
    const VERSION = '1.0.0';
    
    /**
     * Initialize the plugin
     */
    public function __construct()    
    {        

        add_action('init', [$this, 'initAutoPush']);

        // Initialize admin functionality
        if (is_admin()) {
            
             $admin = new \Blazemedia\OneSignal\Admin\Admin;
            
        } else {
            $frontend = new \Blazemedia\OneSignal\Frontend\Frontend;
        }
       
    }

    public function initAutoPush()
    {
        $autoPush = new \Blazemedia\OneSignal\Push\AutoPush;        
    }
} 