document.addEventListener("DOMContentLoaded", function (event) {
/*headers*/
let app_css = document.createElement('link');
app_css.rel = "stylesheet";
app_css.href = "https://plugin.iss.fms.kz/css/app.css";
//app_css.href = "http://localhost:8877/css/app.css";
/*body*/
/*container*/
let btn_container = document.createElement('div');
btn_container.id = "saqtandyry-status-btn-id";
btn_container.type = "button";
btn_container.className = "saqtandyry-status-btn";
btn_container.style.display = "block";
btn_container.innerHTML = `
`;
form_container = document.createElement("div");
form_container.id = "saqtandyry-status-form-id";
form_container.className = "saqtandyry-status-form-container";
form_container.style.display = "none";
form_container.innerHTML = `
`;
/*form*/
var form = document.createElement('iframe');
form.id = 'saqtandyry-form';
form.style.position = "fixed";
form.style.width = "450px";
form.style.height = "550px";
form.style.backgroundColor = "white";
form.frameBorder = "0";
form.allowTransparency = "false";
form.scrolling = 'auto';
form.src = "https://plugin.iss.fms.kz/saqtandyry-form.html";
//form.src = "http://localhost:8877/saqtandyry-form.html";
form_container.appendChild(form);
/*add to document*/
document.body.appendChild(btn_container);
document.body.appendChild(form_container);
document.body.appendChild(app_css);
});
window.onload = function () {
/*listeners*/
document.getElementById('saqtandyry-status-btn-title').addEventListener("click", function (e) {
console.log('click open-button');
document.getElementById('saqtandyry-status-form-id').style.display = 'block';
document.getElementById('saqtandyry-status-btn-id').style.display = 'none';
});
document.getElementById('closeX').addEventListener("click", function (e) {
console.log('click closeX');
document.getElementById('saqtandyry-status-form-id').style.display = 'none';
document.getElementById('saqtandyry-status-btn-id').style.display = 'block';
});
};