import autocomplete from './autocomplete/autocomplete.js';
import search from './search/search.js';
import populateConfig from './global/populate-config.js';
import category from './category/get-category-event.js';
import { athenaConfig, athenaConfigDemo } from './global/athena-config.js';
import { populateGlobalObject } from './global/helpers/athena-global-helper.js';

AthenaXAi.prototype.initiateSearch = (isSPA = false) => {
	isSPA && document.dispatchEvent(new Event('SPAContentLoaded'));

	populateConfig(isSPA);
	populateGlobalObject(isSPA);
	autocomplete(isSPA);
	search(isSPA);
}

AthenaXAi.prototype.category = (categoryId, level) => category(categoryId, level);
AthenaXAi.prototype.athenaConfig = athenaConfig;
AthenaXAi.prototype.athenaConfigDemo = athenaConfigDemo;

export default function AthenaXAi() {}