//  @import com.hedgehoglab.application.service.BaseService;

function TagsService(scope){
    BaseService.call(this,scope);

    this.get_all_tags=function(callback){
        $.getJSON("/api/tags",{},function(data){
            callback(data);
        });
    };
    
    this.get_tags_by_search_term=function(search_term,callback){
        //  http://localhost:8080/api/backend/search-results-tag-panel/
        //$.ajaxSetup({async:false});
        $.getJSON("/api/tags",{"q":search_term},function(data){
            callback(data);
        }); 
    };

    this.get_tags_for_result_search=function(search_term,callback){
        //$.ajaxSetup({async:false});
        $.getJSON("/api/backend/tags-for-contact-search",{"q":search_term.term},function(data){
            callback(data);
        });
    };
};