import{r as l,aj as c,q as u}from"./index-j6d8oBmA.js";const d=r=>{const[e,s]=l.useState(!1),t=l.useRef(!0),[a,n]=c(),o=JSON.stringify(r);return l.useEffect(()=>{r.forEach(({key:i,value:f,setter:Y})=>{if(a.has(i)&&t.current){const m=decodeURIComponent(a.get(i)||"");Y(m)}else a.set(i,f)}),n(a,{replace:!0}),t.current=!1,e||s(!0)},[a,o]),e},D=(r,e)=>{if(r===null&&e===null)return 0;if(r===null)return-1;if(e===null)return 1;var s=u(r,"DD/MM/YYYY HH:mm:ss"),t=u(e,"DD/MM/YYYY HH:mm:ss");return!s.isValid()&&!t.isValid()?0:s.isValid()?t.isValid()?s.valueOf()-t.valueOf():1:-1},p=(r,e)=>{if(r===null&&e===null)return 0;if(r===null)return-1;if(e===null)return 1;var s=u(r,"DD/MM/YYYY"),t=u(e,"DD/MM/YYYY");if(!s.isValid()&&!t.isValid())return 0;if(!s.isValid())return-1;if(!t.isValid())return 1;const a=s.format("YYYYMMDD"),n=t.format("YYYYMMDD");return a===n?0:a<n?-1:1};export{p as a,D as d,d as u};
//# sourceMappingURL=dateComparator-BQLa1pfD.js.map
