<?php
/**
 * Enqueue scripts and styles.
 */
function bstore_scripts()
{
  // // bootstrap stylesheet.
  wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css', [], null);

  // // Fontawesome V5 stylesheet.
  wp_enqueue_style('fontawesome-5', get_template_directory_uri() . '/assets/css/all.min.css', [], null);

    // Web font loaded.
    wp_enqueue_style('bstore-fonts', 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap', [], null );

  // Theme stylesheet.
  wp_enqueue_style('bstore-style', get_stylesheet_uri(), [], BSTORE_VERSION);

  // Add main stylesheet
  wp_enqueue_style('bstore-main-style', get_template_directory_uri() . '/assets/css/bstore-style.css', [], BSTORE_VERSION);

  // Add responsive stylesheet
  wp_enqueue_style('bstore-responsive', get_template_directory_uri() . '/assets/css/responsive.css', [], null);


  /**
   * Load All jQuery Library
   */
  wp_enqueue_script('bstore-navigation', get_template_directory_uri() . '/assets/js/navigation.js', [], BSTORE_VERSION, true);

  wp_enqueue_script('bstore-bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.min.js', [], BSTORE_VERSION, true);

  // Add bstore-main js library
  wp_enqueue_script('bstore-scripts-js', get_template_directory_uri() . '/assets/js/bstore-scripts.js', ['jquery'], '', true);

  if (is_singular() && comments_open() && get_option('thread_comments')) {
    wp_enqueue_script('comment-reply');
  }
}

add_action('wp_enqueue_scripts', 'bstore_scripts');