<?php
// Note: Only minified versions are enqueued for performance.
// Unminified versions are included in /assets/ for WordPress.org review requirements.
// third party resource no need prefix
// custom resource need prefix 


function howcan_enqueue_styles() {
   //swiper
    wp_enqueue_style( 'swiper-css', 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css' );
    wp_enqueue_script( 'swiper-js', 'https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js', array('jquery'), false, true );


    // Bootstrap CSS (only minified loaded 3rd)
    wp_enqueue_style(
        'bootstrap',
        get_template_directory_uri() . '/assets/css/bootstrap.min.css',
        array(),
        '5.3.0',
        'all'
    );

    // Font Awesome (minified only)
    wp_enqueue_style(
        'fontawesome',
        get_template_directory_uri() . '/assets/css/all.min.css',
        array(),
        '6.5.0',
        'all'
    );
    // howcan accesbility.css with prefix
    wp_enqueue_style(
        'howcan-accesbility',
        get_template_directory_uri() . '/assets/css/accesbility.css',
        array(),
        '6.5.0',
        'all'
    );

    // howcan  Editor styles with prefix
    wp_enqueue_style(
        'howcan-editor-style',
        get_template_directory_uri() . '/assets/css/editor-style.css',
        array(),
        null,
        'all'
    );


 // include google font from url no prefix
    wp_enqueue_style( 
        'google-fonts', 
        'https://fonts.googleapis.com/css2?family=Roboto&display=swap', 
        array(), 
        null 
    );
    
    
    
    // WooCommerce custom stylesheet
    wp_enqueue_style( 'howcan-woocommerce', get_template_directory_uri() . '/assets/css/woocommerce.css', array('howcan-style'), '1.0' );



    // howcan custom main css with prefix
    wp_enqueue_style( 'howcan-style', get_stylesheet_uri() );


    // Bootstrap JS bundle (includes Popper) no prefix
    wp_enqueue_script(
        'bootstrap-bundle',
        get_template_directory_uri() . '/assets/js/bootstrap.bundle.min.js',
        array(),
        '5.3.0',
        true
    );
    // howcan (includes Popper) with prefix
    wp_enqueue_script(
        'howcan-custom',
        get_template_directory_uri() . '/assets/js/howcan.js',
        array(),
        '5.3.0',
        true
    );
    
    // howcan main js include with prefix
    wp_enqueue_script( 'howcan-main', get_template_directory_uri() . '/assets/js/main.js', array('jquery'), '1.0', true );
    
    // WordPress comment reply script
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    
    // howcan howcan-menu-access with prefix
    wp_enqueue_script(
        'howcan-menu-access',
        get_template_directory_uri() . '/assets/js/accessibility.js',
        array(),
        '1.0',
        true
    );
    
  

    // Localize readable text (i18n friendly)
    $strings = array(
      'toggle_text' => esc_html__( 'Toggle submenu', 'howcan' ),
    );
    wp_localize_script( 'howcan-menu-access', 'HowcanMenu', $strings );



}
add_action('wp_enqueue_scripts', 'howcan_enqueue_styles');


?>