import{a as O,b as P,c as j}from"./chunk-XEHBQAFR.mjs";var v={};P(v,{default:()=>I});var b,I,M=O(()=>{"use strict";b=function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"input"}],t=[{kind:"Variable",name:"input",variableName:"input"}],r={alias:null,args:null,kind:"ScalarField",name:"deletedId",storageKey:null};return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"RemoveMemberMutation",selections:[{alias:null,args:t,concreteType:"ProfileRemoveMemberPayload",kind:"LinkedField",name:"profileRemoveMember",plural:!1,selections:[r],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"RemoveMemberMutation",selections:[{alias:null,args:t,concreteType:"ProfileRemoveMemberPayload",kind:"LinkedField",name:"profileRemoveMember",plural:!1,selections:[r,{alias:null,args:null,filters:null,handle:"deleteRecord",key:"",kind:"ScalarHandle",name:"deletedId"}],storageKey:null}]},params:{cacheID:"7ede42a17cf2d60398c7a5019de5f013",id:null,metadata:{},name:"RemoveMemberMutation",operationKind:"mutation",text:`mutation RemoveMemberMutation(
  $input: ProfileRemoveMemberInput!
) {
  profileRemoveMember(input: $input) {
    deletedId
  }
}
`}}}();b.hash="4426831487fa708c1e351d2c7608e1f8";I=b});import{useNotification as E}from"@baseapp-frontend/utils";import{useMutation as C}from"react-relay";function c(e){"@babel/helpers - typeof";return c=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},c(e)}var i;function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?g(Object(r),!0).forEach(function(n){S(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function S(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _(e){var t=k(e,"string");return c(t)=="symbol"?t:t+""}function k(e,t){if(c(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(c(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function w(e,t){return $(e)||x(e,t)||T(e,t)||A()}function A(){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 T(e,t){if(e){if(typeof e=="string")return R(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,t):void 0}}function R(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function x(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,d,l,u=[],m=!0,o=!1;try{if(d=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;m=!1}else for(;!(m=(n=d.call(r)).done)&&(u.push(n.value),u.length!==t);m=!0);}catch(f){o=!0,a=f}finally{try{if(!m&&r.return!=null&&(l=r.return(),Object(l)!==l))return}finally{if(o)throw a}}return u}}function $(e){if(Array.isArray(e))return e}var D=(i!==void 0||(i=(M(),j(v)),i.hash&&i.hash!=="4426831487fa708c1e351d2c7608e1f8"&&console.error("The definition of 'RemoveMemberMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data.")),i),L=function(){var t=E(),r=t.sendToast,n=C(D),a=w(n,2),d=a[0],l=a[1],u=function(o){return d(h(h({},o),{},{onCompleted:function(p,s){var y;r("Member removed successfully",{type:"success"}),o==null||(y=o.onCompleted)===null||y===void 0||y.call(o,p,s)},onError:function(p){var s;r(p.message,{type:"error"}),o==null||(s=o.onError)===null||s===void 0||s.call(o,p)}}))};return[u,l]};export{D as a,L as b};
//# sourceMappingURL=chunk-XOCJ3HXP.mjs.map