<?php

/**
 * Enqueue scripts and styles.
 */
function binsight_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);
  wp_enqueue_style('animate', get_template_directory_uri() . '/assets/css/animate.min.css', [], null);

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

  // Theme stylesheet.
  wp_enqueue_style('binsight-style', get_stylesheet_uri(), [], BINSIGHT_VERSION);

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

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


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

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

  wp_enqueue_script('binsight-popper', get_template_directory_uri() . '/assets/js/popper.min.js', [], BINSIGHT_VERSION, true);
  wp_enqueue_script('wow-js', get_template_directory_uri() . '/assets/js/wow.min.js', [], BINSIGHT_VERSION, true);

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

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

add_action('wp_enqueue_scripts', 'binsight_scripts');