let saasAPIoAUTHController = {
	url: '',

	resetData() {
		let self = this;

		self.url = 'https://apidoc.sociallabs.biz/?embebed=1';
	},

	setEvents() {
		let self = this;
		self.resetData();

		$('#title-section').html('');

		self.printIframe();

		let parameters = {
			version: sessionStorage['STCMBackEnd:versionCtrl'],
			compilacion: sessionStorage['STCMBackEnd:versionCtrlCompilacion']
		};
		ajaxComunCallWithCallback('setLastVersionControlled', parameters, function(ajaxReturn) {
			if(ajaxReturn) {
				$('#blog_social_news').hide();
				console.log('Last version controlled: achieved');
			}
		});
	},

	printIframe() {
		let self = this;

		let iframe = `
			<div class="">
				<iframe id="saasAPIIframe" src="${self.url}" class="w-100 he-cal-100vh-n61 border-0" allowfullscreen></iframe>
			</div>
		`;
		$('#iframeSaasAPIoAUTH').html(iframe);
	}
};