{"version":3,"file":"modal-popup.bundle.js","mappings":"AACIA,SAASC,iBAAiB,iBAAiBC,SAAQ,SAASC,GAC5DA,EAAOC,iBAAiB,SAAS,WAC/B,IAAIC,EAAWF,EAAOG,aAAa,eACnCN,SAASO,cAAc,IAAMF,GAAUG,UAAUC,IAAI,YACvD,GACF,IAEAT,SAASC,iBAAiB,mCAAmCC,SAAQ,SAASC,GAC5EA,EAAOC,iBAAiB,SAAS,WAC/BJ,SAASC,iBAAiB,eAAeC,SAAQ,SAASQ,GACxDA,EAAMF,UAAUG,OAAO,YACzB,GACF,GACF,IAEAX,SAASC,iBAAiB,oCAAoCC,SAAQ,SAASC,GACzEA,EAAOS,YAAYC,SAAS,WAC9BV,EAAOC,iBAAiB,SAAS,WAC/BJ,SAASC,iBAAiB,eAAeC,SAAQ,SAASQ,GACxDA,EAAMF,UAAUG,OAAO,YACzB,GACF,GAEJ","sources":["webpack://developer.gov.sg/./apps/src/events/modal-popup.js"],"sourcesContent":["(() => {\n document.querySelectorAll('.modal-button').forEach(function(button) {\n button.addEventListener('click', function() {\n var targetId = button.getAttribute('data-target');\n document.querySelector('#' + targetId).classList.add('is-active');\n });\n });\n \n document.querySelectorAll('.sgds-modal-card-head > .delete').forEach(function(button) {\n button.addEventListener('click', function() {\n document.querySelectorAll('.sgds-modal').forEach(function(modal) {\n modal.classList.remove('is-active');\n });\n });\n });\n \n document.querySelectorAll('.sgds-modal-card-foot > .is-text').forEach(function(button) {\n if (button.textContent.includes('Cancel')) {\n button.addEventListener('click', function() {\n document.querySelectorAll('.sgds-modal').forEach(function(modal) {\n modal.classList.remove('is-active');\n });\n });\n }\n });\n})();\n"],"names":["document","querySelectorAll","forEach","button","addEventListener","targetId","getAttribute","querySelector","classList","add","modal","remove","textContent","includes"],"sourceRoot":""}