/**
  * Enqueue scripts and styles - only called when builder is active.
  * @return void
  */
 function enqueue()
 {
     if (class_exists('FLBuilderModel') && FLBuilderModel::is_builder_active()) {
         // Enqueue Stylesheets
         wp_enqueue_style('fl-template-browser', plugins_url('/css/template-browser.css', dirname(__FILE__)), array('open-sans'));
         // Enqueue Scripts
         wp_enqueue_script('fl-template-browser', plugins_url('/js/min/template-browser-min.js', dirname(__FILE__)), array('backbone', 'wp-util'));
         $data = array('collections' => BRJ_TemplateCollection::get_collections(), 'libraries' => array_values(BRJ_TemplateLibrary::get_libraries()), 'root' => esc_url_raw(get_rest_url()), 'nonce' => wp_create_nonce('wp_rest'));
         wp_localize_script('fl-template-browser', 'BRJ_StoreInitialData', $data);
     }
 }
 function get_items($request)
 {
     return array_values(BRJ_TemplateLibrary::get_libraries());
 }