"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkXD2OIZABjs = require('./chunk-XD2OIZAB.js');var v={};_chunkXD2OIZABjs.b.call(void 0, v,{default:()=>_});var b,_,P=_chunkXD2OIZABjs.a.call(void 0, ()=>{"use strict";b=function(){var e=[{defaultValue:null,kind:"LocalArgument",name:"id"}],t=[{alias:null,args:[{fields:[{kind:"Variable",name:"id",variableName:"id"}],kind:"ObjectValue",name:"input"}],concreteType:"CommentPinPayload",kind:"LinkedField",name:"commentPin",plural:!1,selections:[{alias:null,args:null,concreteType:"Comment",kind:"LinkedField",name:"comment",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"isPinned",storageKey:null}],storageKey:null}],storageKey:null}];return{fragment:{argumentDefinitions:e,kind:"Fragment",metadata:null,name:"CommentPinMutation",selections:t,type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:e,kind:"Operation",name:"CommentPinMutation",selections:t},params:{cacheID:"f52c4201ceaafbbba2ed048338c7b9d6",id:null,metadata:{},name:"CommentPinMutation",operationKind:"mutation",text:`mutation CommentPinMutation(
  $id: ID!
) {
  commentPin(input: {id: $id}) {
    comment {
      id
      isPinned
    }
  }
}
`}}}();b.hash="26f8620978ac19cc3f24ec49176a04b6";_=b});var _utils = require('@baseapp-frontend/utils');var _reactrelay = require('react-relay');function s(e){"@babel/helpers - typeof";return s=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},s(e)}var l;function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g(Object(n),!0).forEach(function(r){k(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function k(e,t,n){return(t=w(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){var t=A(e,"string");return s(t)=="symbol"?t:t+""}function A(e,t){if(s(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(s(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T(e,t){return D(e)||$(e,t)||E(e,t)||x()}function x(){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 E(e,t){if(e){if(typeof e=="string")return C(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)?C(e,t):void 0}}function C(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,d,u,m=[],c=!0,o=!1;try{if(d=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=d.call(n)).done)&&(m.push(r.value),m.length!==t);c=!0);}catch(y){o=!0,a=y}finally{try{if(!c&&n.return!=null&&(u=n.return(),Object(u)!==u))return}finally{if(o)throw a}}return m}}function D(e){if(Array.isArray(e))return e}var F=(l!==void 0||(l=(P(),_chunkXD2OIZABjs.c.call(void 0, v)),l.hash&&l.hash!=="26f8620978ac19cc3f24ec49176a04b6"&&console.error("The definition of 'CommentPinMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data.")),l),N= exports.b =function(){var t=_utils.useNotification.call(void 0, ),n=t.sendToast,r=_reactrelay.useMutation.call(void 0, F),a=T(r,2),d=a[0],u=a[1],m=function(o){return d(h(h({},o),{},{onCompleted:function(f,i){var p;_optionalChain([i, 'optionalAccess', _2 => _2.forEach, 'call', _3 => _3(function(O){n(O.message,{type:"error"})})]),o==null||(p=o.onCompleted)===null||p===void 0||p.call(o,f,i)},onError:function(f){var i;n(f.message,{type:"error"}),o==null||(i=o.onError)===null||i===void 0||i.call(o,f)}}))};return[m,u]};exports.a = F; exports.b = N;
//# sourceMappingURL=chunk-SAW57WUQ.js.map