import{r as s,a$ as c}from"./index.4d061c66.js";const l=s(!1),a=s(null),t=s(""),d=()=>({isDisabled:l,timer:a,text:t,start:async(r,n,e=60)=>{if(!r)return;const u=c(e);await r.validateField(n,v=>{v&&(clearInterval(a.value),a.value=setInterval(()=>{e>0?(t.value=`${e}`,l.value=!0,e-=1):(t.value="",l.value=!1,clearInterval(a.value),e=u)},1e3))})},end:()=>{t.value="",l.value=!1,clearInterval(a.value)}});export{d as u};
