<?php
// Security: Prevent direct access to plugin files.
defined( 'ABSPATH' ) || exit;

class IOTC_Core {

    public function __construct() {
        $this->load_dependencies();
        $this->set_locale();
        $this->init_components();
    }

    /**
     * Load required class files.
     */
    private function load_dependencies() {
        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-iotc-scanner.php';
        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-iotc-admin.php';
        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-iotc-actions.php';
        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-iotc-cron.php';
    }

    /**
     * Set the locale for translation.
     */
    private function set_locale() {
        // Text domain is loaded automatically by WordPress since 4.6
    }



    /**
     * Initialize all components.
     */
    private function init_components() {
        new IOTC_Admin();
        new IOTC_Actions();
        new IOTC_Cron();
    }
}
