"use strict";const n=require("react"),h=require("react-router-dom");function b(t,u,s="tab"){const[a,o]=h.useSearchParams(),r=n.useCallback(e=>e!==null&&u.includes(e),[u]),i=n.useMemo(()=>{const e=a.get(s);return r(e)?e:t},[a,s,r,t]),l=n.useCallback(e=>{o(P=>{const c=new URLSearchParams(P);return e===t?c.delete(s):c.set(s,e),c},{replace:!0})},[o,t,s]);return{activeTab:i,setActiveTab:l,isValidTab:r}}exports.useTabNavigation=b;
//# sourceMappingURL=useTabNavigation-BVtbCTd5.js.map
