<?php
/**
 * @package Extract Text from Image - ETFI
 */
/*
  Plugin Name: Extract Text from Image - ETFI
  Plugin URI: https://wordpress.org/plugins/extract-text-from-image-etfi/
  Description: Easily Extract text from image using Amazon Textract.
  Version: 1.2.1
  Author: Sanatan Tech Innovation Pvt Ltd
  Author URI: https://sanatantechnovation.com/
  License: GPLv2 or later
  License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
  Text Domain: extract-text-from-image-etfi
 */
//Add confing file

define( 'ETFI_VERSION', '1.2.0' );

define( 'ETFI_REQUIRED_WP_VERSION', '5.0' );

//GET PLUGIN URL
define('ETFI_URL', plugin_dir_url( __FILE__ ));

//GET PLUGIN DIR PATH
define('ETFI_PATH', plugin_dir_path( __DIR__ ));

require_once plugin_dir_path(__FILE__) . 'vendor/aws-autoloader.php';
require_once plugin_dir_path(__FILE__) . 'include/functions.php';

//UPDATE DATA

if (is_admin()) {
    require_once  plugin_dir_path(__FILE__) . 'admin/ExtractTextAdmin.php';
}



if (!class_exists('ETFI_ExtractText')) :

   class ETFI_ExtractText {
     public function __construct() {
        $this->etfi_init();
     }

      // Init Method

       public function etfi_init() {

            if (is_admin()) {

                $obj_admin = new ETFI_ExtractTextAdmin();
	         }
           
           $this->etfi_actions();

       }


        // Add Action

        public function etfi_actions() {
              add_action('wp_enqueue_scripts', array($this, 'etfi_frontend_css'));
			  add_action('wp_footer', array($this, 'etfi_frontend_script'));
        }


        // Load Css Javascript

        public function etfi_frontend_css() {

            // Register the style like this for a plugin:
			wp_register_style('etfi_aksFileUpload', plugin_dir_url( __FILE__ ). 'assets/css/aksFileUpload.min.css', array(), '1', 'all');
			wp_register_style('etfi_askFileupload_custom', plugin_dir_url( __FILE__ ). 'assets/css/askFileupload-custom.css', array(), '1', 'all');
			wp_enqueue_style('etfi_aksFileUpload');
			wp_enqueue_style('etfi_askFileupload_custom');
			   

        }
		 public function etfi_frontend_script() {

            // Register the style like this for a plugin:
			   
			  wp_register_script('etfi_aksFileUpload', plugin_dir_url( __FILE__ ) . "assets/js/aksFileUpload.min.js", array('jquery'), '1.8.3', true );
			  wp_register_script('etfi_aksFileUpload_custom', plugin_dir_url( __FILE__ ) . "assets/js/custom-aksFileUpload.js", array('jquery'), '1.8.3', true );
              wp_enqueue_script('etfi_aksFileUpload');
			  wp_enqueue_script('etfi_aksFileUpload_custom');
             

        }
}
    endif;





//Call class object 

$OBJ = NEW ETFI_ExtractText();