import{p as s,be as c}from"./index.4d3e3847.js";const l=s(!1),a=s(null),t=s(""),d=()=>({isDisabled:l,timer:a,text:t,start:async(n,r,e=60)=>{if(!n)return;const u=c(e);await n.validateField(r,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};
