import { EventsScript } from './events' import { ShowcasesScript } from './showcases' import { SearchScript } from './search' import { TryOnScript } from './try-on' import { logger } from './utils/logger' const scriptElement = document.currentScript if (scriptElement && scriptElement instanceof HTMLScriptElement) { const store = scriptElement.dataset.store if (store) { if (store === 'casaevideo') { new EventsScript(store).execute() } else { new EventsScript(store).execute() new SearchScript(store).execute() new ShowcasesScript(store).execute() new TryOnScript(store).execute() } } else { logger.error('Invalid data-store attribute on script tag.') } } else { logger.error('The script code must the src in a script tag.') }