import{p as s,q as a,i as p}from"./index-CXwCk-SR.js";const o="traceId";function q(){const t=s(),r=a(),u=p(()=>{const e=t.query[o];return typeof e=="string"&&e.length>0?e:null});function n(e){e&&r.push({path:t.path,query:{...t.query,[o]:e}})}function c(){const e={...t.query};delete e[o],r.replace({path:t.path,query:e})}return{openTraceId:u,openTrace:n,closeTrace:c}}export{q as u};
