import{a as R,b as N,c as O}from"./chunk-XEHBQAFR.mjs";var A={};N(A,{default:()=>_});var b,_,v=R(()=>{"use strict";b=function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{kind:"Variable",name:"input",variableName:"input"}],n={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},a={alias:null,args:null,kind:"ScalarField",name:"notificationsUnreadCount",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"NotificationsMarkAllAsReadMutation",selections:[{alias:null,args:t,concreteType:"NotificationsMarkAllAsReadPayload",kind:"LinkedField",name:"notificationsMarkAllAsRead",plural:!1,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"recipient",plural:!1,selections:[n,a],storageKey:null}],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"NotificationsMarkAllAsReadMutation",selections:[{alias:null,args:t,concreteType:"NotificationsMarkAllAsReadPayload",kind:"LinkedField",name:"notificationsMarkAllAsRead",plural:!1,selections:[{alias:null,args:null,concreteType:null,kind:"LinkedField",name:"recipient",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"__typename",storageKey:null},n,a],storageKey:null}],storageKey:null}]},params:{cacheID:"a11d630beface00eb5af3e151d4990b0",id:null,metadata:{},name:"NotificationsMarkAllAsReadMutation",operationKind:"mutation",text:`mutation NotificationsMarkAllAsReadMutation(
  $input: NotificationsMarkAllAsReadInput!
) {
  notificationsMarkAllAsRead(input: $input) {
    recipient {
      __typename
      id
      notificationsUnreadCount
    }
  }
}
`}}}();b.hash="e279aaf7402cac25fd7acbce4f1b9504";_=b});import{useNotification as x}from"@baseapp-frontend/utils";import{useMutation as E}from"react-relay";function d(e){"@babel/helpers - typeof";return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(e)}var l;function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,a)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(a){j(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function j(e,t,n){return(t=S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e){var t=P(e,"string");return d(t)=="symbol"?t:t+""}function P(e,t){if(d(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t||"default");if(d(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w(e,t){return C(e)||K(e,t)||I(e,t)||T()}function T(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I(e,t){if(e){if(typeof e=="string")return k(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(e,t):void 0}}function k(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function K(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,o,f,u,s=[],c=!0,i=!1;try{if(f=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=f.call(n)).done)&&(s.push(a.value),s.length!==t);c=!0);}catch(y){i=!0,o=y}finally{try{if(!c&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(i)throw o}}return s}}function C(e){if(Array.isArray(e))return e}var F=(l!==void 0||(l=(v(),O(A)),l.hash&&l.hash!=="e279aaf7402cac25fd7acbce4f1b9504"&&console.error("The definition of 'NotificationsMarkAllAsReadMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data.")),l),q=function(){var t=x(),n=t.sendToast,a=E(F),o=w(a,2),f=o[0],u=o[1],s=function(i){return f(g(g({},i),{},{onCompleted:function(p,r){var m;r?.forEach(function(h){n(h.message,{type:"error"})}),i==null||(m=i.onCompleted)===null||m===void 0||m.call(i,p,r)},onError:function(p){var r;n(p.message,{type:"error"}),i==null||(r=i.onError)===null||r===void 0||r.call(i,p)}}))};return[s,u]};export{q as a};
//# sourceMappingURL=chunk-CMKFNYDA.mjs.map