<?php

/**
 * Admin Scripts Handler
 * 
 * @package cwpt
 * @since 1.0.0
 */

defined('ABSPATH') or die;

class CWPT_Admin_Scripts
{
    /**
     * Enqueue admin scripts and styles
     * 
     * @return void
     */
    public static function enqueue()
    {
        $plugin_url = plugin_dir_url(dirname(__FILE__) . '/../custom-woocommerce-product-type.php');
        
        wp_enqueue_script(
            'cwpt_admin_js',
            $plugin_url . 'includes/js/cwpt_admin.js',
            [],
            null,
            true
        );
        wp_enqueue_script(
            'cwpt_cond_js',
            $plugin_url . 'assets/js/cmb2-conditionals.js',
            [],
            null,
            true
        );

        wp_enqueue_script(
            'cwpt_shwitcher_js',
            $plugin_url . 'assets/js/jquery.switcher.min.js',
            [],
            null,
            true
        );

        wp_enqueue_style('cwpt_admin_css', $plugin_url . 'assets/css/cwpt_admin.css');
        wp_enqueue_style('cwpt_switcher_css', $plugin_url . 'assets/css/switcher.css');
    }
}
