"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 _chunkOPZP7MFZjs = require('./chunk-OPZP7MFZ.js');var _chunkMAXGEGSIjs = require('./chunk-MAXGEGSI.js');var _react = require('react');var _icons = require('@baseapp-frontend/design-system/components/web/icons');var _material = require('@mui/material');var _reactrelay = require('react-relay');var _jsxruntime = require('react/jsx-runtime');function s(e){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},s(e)}function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,n)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?b(Object(t),!0).forEach(function(n){g(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function g(e,r,t){return(r=O(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function O(e){var r=S(e,"string");return s(r)=="symbol"?r:r+""}function S(e,r){if(s(e)!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,r||"default");if(s(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function h(e,r){return I(e)||A(e,r)||_(e,r)||w()}function w(){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,r){if(e){if(typeof e=="string")return v(e,r);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?v(e,r):void 0}}function v(e,r){(r==null||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function A(e,r){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var n,o,y,l,i=[],u=!0,f=!1;try{if(y=(t=t.call(e)).next,r===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=y.call(t)).done)&&(i.push(n.value),i.length!==r);u=!0);}catch(d){f=!0,o=d}finally{try{if(!u&&t.return!=null&&(l=t.return(),Object(l)!==l))return}finally{if(f)throw o}}return i}}function I(e){if(Array.isArray(e))return e}var E=function(r){var t=r.addNewProfileLabel,n=t===void 0?"New organization":t,o=r.CreateProfileModal,y=o===void 0?_chunkOPZP7MFZjs.a:o,l=_react.useState.call(void 0, !1),i=h(l,2),u=i[0],f=i[1],d=_reactrelay.useLazyLoadQuery.call(void 0, _chunkMAXGEGSIjs.a,{}),a=d.me;return a!=null&&a.canAdd?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _material.Stack,{children:_jsxruntime.jsxs.call(void 0, _material.MenuItem,{tabIndex:0,component:_material.ButtonBase,sx:{justifyContent:"space-between"},onClick:function(){return f(!0)},children:[n,_jsxruntime.jsx.call(void 0, _icons.AddIcon,{color:"action"})]})}),_jsxruntime.jsx.call(void 0, y,{open:u,setOpen:f,userId:_optionalChain([a, 'optionalAccess', _2 => _2.id])})]}):null},z=function(r){return _jsxruntime.jsx.call(void 0, _react.Suspense,{children:_jsxruntime.jsx.call(void 0, E,j({},r))})},W= exports.a =z;exports.a = W;
//# sourceMappingURL=chunk-VVWSJLBS.js.map