bim_gdpr-1.0.0-rc3/libraries/src/templates/quick-template/js/quick-template.js
libraries/src/templates/quick-template/js/quick-template.js
// Test if bgdpr is defined.
import {QuickTemplate} from "bim-gdpr/src/templates/quick_template/quick_template";
if( bgdpr && drupalSettings.bim_gdpr !== undefined){
document.addEventListener('DOMContentLoaded', () => {
const translation = drupalSettings.bim_gdpr.translation
bgdpr.getLocalManager().setUserLanguage(drupalSettings.bim_gdpr.currentLanguage)
// console.log(translation)
bgdpr.addTranslation( translation );
const template = bgdpr.setTemplate(new QuickTemplate())
if( drupalSettings.bim_gdpr.template_settings.no_css === 1 ){
template.getTemplate().setCssList([]);
}
bgdpr.init();
})
}
