import{as as n}from"./vendor-DWvj1jit.js";import{a1 as o,a2 as i,a3 as d}from"./index-B67YzpGs.js";import{O as m,P as C,a as l}from"./types-zo7pMMkl.js";function D(){return n(l,{optimisticResponse:{markPushMessageRead:!0},update(a,r,{variables:u}){if(!r.data?.markPushMessageRead)return;let s=null;a.updateFragment({id:`${o}${u?.command?.messageId}`,fragment:C},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:[m.Query.GetPushMessages]})}export{D as u};
//# sourceMappingURL=index-BeCbqN9-.js.map
