"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 _chunkGGVHDHJ6js = require('./chunk-GGVHDHJ6.js');var _chunk6H7YCGHOjs = require('./chunk-6H7YCGHO.js');var _buttons = require('@baseapp-frontend/design-system/components/web/buttons');var _displays = require('@baseapp-frontend/design-system/components/web/displays');var _material = require('@mui/material');var _reactvirtuoso = require('react-virtuoso');var _jsxruntime = require('react/jsx-runtime');function a(t){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(t)}function w(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,o)}return r}function u(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?w(Object(r),!0).forEach(function(o){I(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function I(t,e,r){return(e=K(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function K(t){var e=R(t,"string");return a(e)=="symbol"?e:e+""}function R(t,e){if(a(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var o=r.call(t,e||"default");if(a(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var X=function(e){var r=e.searchValue,o=e.profiles,n=o===void 0?[]:o,c=e.isPending,A=e.isLoadingNext,C=e.hasNext,l=e.loadNext,m=e.renderItem,p=e.VirtuosoProps,F=p===void 0?{}:p,f=e.NormalListProps,T=f===void 0?{}:f,b=e.label,E=b===void 0?"Available connections":b,y=e.title,v=y===void 0?"Connections":y,g=e.EmptyProfilesListState,M=g===void 0?_chunkGGVHDHJ6js.a:g,P=e.SearchNotFoundState,D=P===void 0?_chunk6H7YCGHOjs.a:P,h=e.allowAddMember,V=h===void 0?!1:h,S=e.onAddMemberClick,k=S===void 0?function(){}:S,x=e.removeTitle,B=x===void 0?!1:x,j=_material.useTheme.call(void 0, ),_=function(){return A?_jsxruntime.jsx.call(void 0, _displays.LoadingState,{sx:{paddingTop:3,paddingBottom:1},CircularProgressProps:{size:15},"aria-label":"loading more profiles"}):_jsxruntime.jsx.call(void 0, _material.Box,{sx:{paddingTop:3}})},d=l,O=n.length===0;return!c&&r&&O&&d?_jsxruntime.jsx.call(void 0, D,{}):!c&&O&&d?_jsxruntime.jsx.call(void 0, M,{}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "menu",{"aria-label":E,children:!B&&_jsxruntime.jsx.call(void 0, _material.Typography,{variant:"subtitle2",color:"text.primary",sx:{padding:v===""?0:j.spacing(2),borderBottom:"1px solid ".concat(j.palette.divider)},children:v})}),V&&_jsxruntime.jsx.call(void 0, _buttons.AvatarButton,{onClick:k,caption:"Add Member"}),d?_jsxruntime.jsx.call(void 0, _reactvirtuoso.Virtuoso,u({data:n,itemContent:function(Y,H){return m(H)},style:{scrollbarWidth:"none",maxHeight:"250px"},components:{Footer:_},endReached:function(){C&&_optionalChain([l, 'optionalCall', _2 => _2(5)])}},F)):_jsxruntime.jsx.call(void 0, _material.Box,u(u({maxHeight:250,overflow:"auto",sx:{scrollbarWidth:"none"}},T),{},{children:n.map(function(s){return m(s,!0)})}))]})},ae= exports.a =X;exports.a = ae;
//# sourceMappingURL=chunk-5RANKLPA.js.map