import{aq as n}from"./vendor-d3O24IFR.js";import{Z as o,$ as i,a0 as d}from"./index-DtNTt4xe.js";import{a as m,O as C,P as l}from"./types-zo7pMMkl.js";function D(){return n(m,{optimisticResponse:{markPushMessageRead:!0},update(a,r,{variables:u}){if(!r.data?.markPushMessageRead)return;let s=null;a.updateFragment({id:`${o}${u?.command?.messageId}`,fragment:l},t=>(s=t,t?{...t,isRead:!0}:null)),a.modify({fields:{[d]:t=>{const e=t;return s?.isHidden?e:{totalCount:e.totalCount?e.totalCount-1:0}},[i]:t=>{const e=t;return{totalCount:e.totalCount?e.totalCount-1:0}}}})},refetchQueries:[C.Query.GetPushMessages]})}export{D as u};
//# sourceMappingURL=index-CcJ35nD7.js.map
