function createCountdownTimer({initialSeconds:e,countdownWrapperId:t,countdownTimerElementId:n,elementToShowId:d}){let r=e,i=null,o=!1;const a=document.getElementById(t),l=document.getElementById(n),c=document.getElementById(d);function s(){var e;l&&(l.textContent=(e=r,Math.floor(e/60)+":"+(e%60).toString().padStart(2,"0")))}function m(){o||(o=!0,clearInterval(i),i=setInterval(()=>{0===r?(clearInterval(i),o=!1,c&&(c.classList.remove("hidden"),c.disabled=!1),a&&a.classList.add("hidden")):(r--,s())},1e3))}return s(),{startTimer:m,resetTimer:function(){o=!1,clearInterval(i),r=e,s(),m(),c&&(c.classList.add("hidden"),c.disabled=!0),a&&a.classList.remove("hidden")},isPending:function(){return o}}}
