<?php
/**
 * Let's init the component properly :
 * We load the classes :
 */
if(defined('Eonet')) {

    add_action('plugins_loaded', 'eonet_component_init_live_search');

    function eonet_component_init_live_search()
    {

        // Classes to load :
        $component_classes = array(
            'ComponentLiveSearch\EonetLiveSearch',
        );
        // Load them :
        foreach ($component_classes as $class) {
            eonet_autoload($class);
        }
        // Fire it !
	    eonet_live_search();

        // Hook it
        do_action('eonet_component_after_init_live_search');

    }

	if(!function_exists('eonet_live_search')) {
		/**
		 * Return the static instance of the class, in this way the class is instanced only one time and ae avoided actions doubled
		 *
		 * @return \ComponentManualUserApprove\EonetManualUserApprove
		 */
		function eonet_live_search() {
			return \ComponentLiveSearch\EonetLiveSearch::instance();
		}
	}

}
