<?php

namespace DaftPlug\Generatify\Features\Automations;

use DaftPlug\Generatify\Features\Connectors\Models;
use DaftPlug\Generatify\Features\Chatbot\Prompt;
use DaftPlug\Generatify\Features\Chatbot\Response;
use DaftPlug\Generatify\Helpers\Utils;
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
class SEO {
    public function __construct() {
        add_action( 'wp_enqueue_scripts', [$this, 'loadAltImageDetectionAssets'] );
    }

    public function loadAltImageDetectionAssets() {
        if ( Utils::getSetting( 'aiAltImages' ) !== 'on' ) {
            return;
        }
        $dependencies = [];
        Utils::enqueueTensorFlow();
        // Load the MobileNet model
        wp_enqueue_script(
            'generatify-mobilenet',
            plugins_url( 'assets/js/vendor/mobilenet.js', GENERATIFY_FILE ),
            $dependencies,
            GENERATIFY_VERSION,
            true
        );
        $dependencies[] = 'generatify-mobilenet';
        // Load Alt Image Detection script
        wp_enqueue_script(
            'generatify-alt-image-detection',
            plugins_url( 'assets/js/altImageDetection.js', GENERATIFY_FILE ),
            $dependencies,
            GENERATIFY_VERSION,
            true
        );
    }

}
