"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 b={};_chunkXD2OIZABjs.b.call(void 0, b,{default:()=>M});var y,M,v=_chunkXD2OIZABjs.a.call(void 0, ()=>{"use strict";y=function(){var e={defaultValue:null,kind:"LocalArgument",name:"connections"},n={defaultValue:null,kind:"LocalArgument",name:"input"},a=[{kind:"Variable",name:"input",variableName:"input"}],t={alias:null,args:null,kind:"ScalarField",name:"id",storageKey:null},l={alias:null,args:null,concreteType:"OrganizationEdge",kind:"LinkedField",name:"organization",plural:!1,selections:[{alias:null,args:null,concreteType:"Organization",kind:"LinkedField",name:"node",plural:!1,selections:[t],storageKey:null}],storageKey:null},o={alias:null,args:null,concreteType:"ErrorType",kind:"LinkedField",name:"errors",plural:!0,selections:[{alias:null,args:null,kind:"ScalarField",name:"field",storageKey:null},{alias:null,args:null,kind:"ScalarField",name:"messages",storageKey:null}],storageKey:null};return{fragment:{argumentDefinitions:[e,n],kind:"Fragment",metadata:null,name:"OrganizationCreateMutation",selections:[{alias:null,args:a,concreteType:"OrganizationCreatePayload",kind:"LinkedField",name:"organizationCreate",plural:!1,selections:[l,{alias:null,args:null,concreteType:"ProfileEdge",kind:"LinkedField",name:"profile",plural:!1,selections:[{alias:null,args:null,concreteType:"Profile",kind:"LinkedField",name:"node",plural:!1,selections:[{args:null,kind:"FragmentSpread",name:"ProfileItemFragment"}],storageKey:null}],storageKey:null},o],storageKey:null}],type:"Mutation",abstractKey:null},kind:"Request",operation:{argumentDefinitions:[n,e],kind:"Operation",name:"OrganizationCreateMutation",selections:[{alias:null,args:a,concreteType:"OrganizationCreatePayload",kind:"LinkedField",name:"organizationCreate",plural:!1,selections:[l,{alias:null,args:null,concreteType:"ProfileEdge",kind:"LinkedField",name:"profile",plural:!1,selections:[{alias:null,args:null,concreteType:"Profile",kind:"LinkedField",name:"node",plural:!1,selections:[t,{alias:null,args:null,kind:"ScalarField",name:"name",storageKey:null},{alias:null,args:[{kind:"Literal",name:"height",value:100},{kind:"Literal",name:"width",value:100}],concreteType:"File",kind:"LinkedField",name:"image",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"url",storageKey:null}],storageKey:"image(height:100,width:100)"},{alias:null,args:null,concreteType:"URLPath",kind:"LinkedField",name:"urlPath",plural:!1,selections:[{alias:null,args:null,kind:"ScalarField",name:"path",storageKey:null},t],storageKey:null}],storageKey:null}],storageKey:null},{alias:null,args:null,filters:null,handle:"prependEdge",key:"",kind:"LinkedHandle",name:"profile",handleArgs:[{kind:"Variable",name:"connections",variableName:"connections"}]},o],storageKey:null}]},params:{cacheID:"695d91d3d1771c63d98fd763396c8088",id:null,metadata:{},name:"OrganizationCreateMutation",operationKind:"mutation",text:`mutation OrganizationCreateMutation(
  $input: OrganizationCreateInput!
) {
  organizationCreate(input: $input) {
    organization {
      node {
        id
      }
    }
    profile {
      node {
        ...ProfileItemFragment
        id
      }
    }
    errors {
      field
      messages
    }
  }
}

fragment ProfileItemFragment on Profile {
  id
  name
  image(width: 100, height: 100) {
    url
  }
  urlPath {
    path
    id
  }
}
`}}}();y.hash="555c8c1ef3a4c59a8cd9cf1c8396dc13";M=y});var _utils = require('@baseapp-frontend/utils');var _reactrelay = require('react-relay');function g(e){"@babel/helpers - typeof";return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},g(e)}var u;function h(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),a.push.apply(a,t)}return a}function k(e){for(var n=1;n<arguments.length;n++){var a=arguments[n]!=null?arguments[n]:{};n%2?h(Object(a),!0).forEach(function(t){S(e,t,a[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):h(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function S(e,n,a){return(n=K(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function K(e){var n=T(e,"string");return g(n)=="symbol"?n:n+""}function T(e,n){if(g(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var t=a.call(e,n||"default");if(g(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function j(e,n){return A(e)||w(e,n)||_(e,n)||L()}function L(){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,n){if(e){if(typeof e=="string")return O(e,n);var a={}.toString.call(e).slice(8,-1);return a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set"?Array.from(e):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?O(e,n):void 0}}function O(e,n){(n==null||n>e.length)&&(n=e.length);for(var a=0,t=Array(n);a<n;a++)t[a]=e[a];return t}function w(e,n){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var t,l,o,s,d=[],c=!0,r=!1;try{if(o=(a=a.call(e)).next,n===0){if(Object(a)!==a)return;c=!1}else for(;!(c=(t=o.call(a)).done)&&(d.push(t.value),d.length!==n);c=!0);}catch(p){r=!0,l=p}finally{try{if(!c&&a.return!=null&&(s=a.return(),Object(s)!==s))return}finally{if(r)throw l}}return d}}function A(e){if(Array.isArray(e))return e}var R=(u!==void 0||(u=(v(),_chunkXD2OIZABjs.c.call(void 0, b)),u.hash&&u.hash!=="555c8c1ef3a4c59a8cd9cf1c8396dc13"&&console.error("The definition of 'OrganizationCreateMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data.")),u),q= exports.b =function(){var n=_utils.useNotification.call(void 0, ),a=n.sendToast,t=_reactrelay.useMutation.call(void 0, R),l=j(t,2),o=l[0],s=l[1],d=function(r){return o(k(k({},r),{},{onCompleted:function(m,i){var f;_optionalChain([i, 'optionalAccess', _2 => _2.forEach, 'call', _3 => _3(function(C){a(C.message,{type:"error"})})]),r==null||(f=r.onCompleted)===null||f===void 0||f.call(r,m,i)},onError:function(m){var i;a(m.message,{type:"error"}),r==null||(i=r.onError)===null||i===void 0||i.call(r,m)}}))};return[d,s]};exports.a = R; exports.b = q;
//# sourceMappingURL=chunk-B5ZUUBXU.js.map