'use strict';

function Htmlfile() {	
    this.HtmlField = function (textFields, elem) {
		let langueId = 1;
		if (langue === 'fr') {
			langueId = 2;
		}
		
		const lUrlApi = getRootApi() + 'HtmlFile/content/' + textFields + '?langueId=' + langueId;

		$.ajax({
			type: 'GET',
			contentType: 'application/json',
			url: lUrlApi,
			headers: _Tokken.getHeaders()
		}).done(function (data) {
			if (data != null) {
				elem.innerHTML = data;
			}
		}).fail(function (jqXHR, textStatus, errorThrown) {
			console.log(jqXHR);
		});
    }
}

const _Htmlfile = new Htmlfile();
