import{a6 as d}from"./vendor-BGtMsOoo.js";import{J as m,U as i,K as C}from"./index-CRze-aDK.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:a}){var o,r;if(!((o=s.data)!=null&&o.markPushMessageRead))return;let u=null;n.updateFragment({id:`${m}${(r=a==null?void 0:a.command)==null?void 0:r.messageId}`,fragment:f},t=>(u=t,t?{...t,isRead:!0}:null)),n.modify({fields:{[C]:t=>{const e=t;return u!=null&&u.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-DbcF6rmZ.js.map
