define([
        'jquery'
    ],
    function ($) {
        return {
            search: function (searchTerms, config) {
                let url = "//" + window.location.hostname + "/" + config.moduleUrl +  "/ajax/stores";
                let search = $.ajax({
                    dataType: 'json',
                    url: url,
                    data: searchTerms
                });
                return search;
            }
        }
    }
);
