import{ah as l,ar as m,ac as u}from"./index-DnOofkhW.js";const d=r=>{const[e,s]=l.useState(!1),t=l.useRef(!0),[a,n]=m(),o=JSON.stringify(r);return l.useEffect(()=>{r.forEach(({key:i,value:f,setter:Y})=>{if(a.has(i)&&t.current){const c=decodeURIComponent(a.get(i)||"");Y(c)}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-MwuZG2QQ.js.map
