import{aa as d}from"./vendor-bSWkQivH.js";import{J as m,U as i,K as C}from"./index-Dqv5IkpS.js";import{O as _,P as f,a as D}from"./types-zo7pMMkl.js";function M(){return d(D,{optimisticResponse:{markPushMessageRead:!0},update(n,s,{variables:u}){var o,r;if(!((o=s.data)!=null&&o.markPushMessageRead))return;let a=null;n.updateFragment({id:`${m}${(r=u==null?void 0:u.command)==null?void 0:r.messageId}`,fragment:f},t=>(a=t,t?{...t,isRead:!0}:null)),n.modify({fields:{[C]:t=>{const e=t;return a!=null&&a.isHidden?e:{totalCount:e.totalCount?e.totalCount-1:0}},[i]:t=>{const e=t;return{totalCount:e.totalCount?e.totalCount-1:0}}}})},refetchQueries:[_.Query.GetPushMessages]})}export{M as u};
//# sourceMappingURL=index-CAMXIOZf.js.map
