import{n as c,r as e}from"./index-09tpYl64.js";const m=c(e.createElement("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"})),v=c(e.createElement("path",{d:"M8 5v14l11-7z"})),h=c(e.createElement("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"})),p=({timerIsOn:s,updatePromise:f,isLoading:n,initialSeconds:l=60})=>{const[r,u]=e.useState(l),o=e.useCallback(()=>setInterval(()=>{u(a=>a>-1?a-1:a)},1e3),[]),t=e.useRef(null);return e.useEffect(()=>{n||u(l)},[n]),e.useEffect(()=>{(async()=>r===0&&(clearInterval(t.current),await f(),t.current=o()))()},[r]),e.useEffect(()=>(s?t.current=o():clearInterval(t.current),()=>{clearInterval(t.current)}),[s]),{seconds:r}};export{m as P,h as R,v as a,p as u};
//# sourceMappingURL=useMESFTimer-Dy0TlNj3.js.map
