// Dialog component for Billit
// Replaces browser confirm/alert dialogs with custom styled modals
(function() {
'use strict';
// Dialog state
let currentResolve = null;
let currentElement = null;
// Create dialog HTML structure
function createDialogElement() {
const dialog = document.createElement('div');
dialog.id = 'dialog';
dialog.className = 'dialog-overlay';
dialog.innerHTML = `
Please read these terms carefully before using this software. By proceeding, you agree to the conditions below:
-
1. FREE OF CHARGE & CPA EXEMPTION: This software is provided strictly "Free of Charge" and without any monetary consideration. It therefore does not constitute a "Service" under the Indian Consumer Protection Act, 2019.
-
2. "AS IS" & NO WARRANTY: The software is provided "AS IS". The developer provides NO WARRANTY, express or implied, regarding its performance, accuracy, security, or suitability for any purpose.
-
3. USER ASSUMPTION OF RISK: The developer is not liable for any financial losses, data corruption, calculation errors, or legal issues resulting from the use or misuse of this application. Users assume all associated risks and agree to indemnify and hold harmless the developer.
Consult a qualified legal or financial advisor before relying on any data generated by this tool.
`;
Dialog.custom({
title: '⚠️ GENERAL USE & NO LIABILITY DISCLAIMER',
html: disclaimerHTML,
confirmText: 'I Understand & Accept',
confirmClass: 'btn-primary',
showCancel: false,
wide: true,
allowClose: false
}).then(function(accepted) {
if (accepted) {
localStorage.setItem(DISCLAIMER_KEY, Date.now().toString());
}
});
}
// Show disclaimer when DOM is ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', showDisclaimer);
} else {
showDisclaimer();
}
})();