import{u as useSelector,ag as selectIsFullscreenEnabled,d as userSelector,j as jsxRuntimeExports,bg as img$5,B as Box,q as mountPanel}from"./js-core.esm4.js";import{s as selectActiveResourceTab,b as selectActiveResourceSearchValues,p as selectAdapters,q as selectAdaptersHasMore,r as selectAdaptersOffset,t as selectAdaptersLoadingStatus,h as actions,S as SHARED_TEXT$2}from"./js-core.esm40.js";import{E as EResourceTypeValue}from"./js-core.esm15.js";import{t as tableInfiniteScroll}from"./js-core.esm9.js";import{E as Engines}from"./js-core.esm7.js";import{E as EmptySearch,R as ResourceCard}from"./js-core.esm105.js";import{u as useDispatch}from"./js-core.esm12.js";import"./js-core.esm30.js";import"./js-core.esm28.js";import"./js-core.esm33.js";import"./js-core.esm37.js";import"./js-core.esm46.js";var TableInfiniteScroll=tableInfiniteScroll.jsx.TableInfiniteScroll,IOAdaptersTable=function(){var a=useDispatch(),o=useSelector(selectIsFullscreenEnabled),s=useSelector(userSelector),e=useSelector(selectActiveResourceTab),e=!!useSelector(selectActiveResourceSearchValues)[e],t=useSelector(selectAdapters),r=useSelector(selectAdaptersHasMore),n=useSelector(selectAdaptersOffset),i=useSelector(selectAdaptersLoadingStatus),l=SHARED_TEXT$2.adapters.emptyState,c=SHARED_TEXT$2.adapters.errorState;return jsxRuntimeExports.jsx(TableInfiniteScroll,{hasMore:r,fetchMore:function(){a(actions.adapters.fetchAdaptersStart())},fetchOnMount:0===t.length,TableEmptyStateComponent:e?jsxRuntimeExports.jsx(EmptySearch,{}):void 0,offset:n,items:t,itemHeight:180,isLoading:"pending"===i,error:"failure"===i,TableRowComponent:function(e){var t=e.item,r=!(Number(null==t||null==(e=t.ownerOrganization)?void 0:e.id)===Number(null==s||null==(e=s.organization)?void 0:e.organizationId));return jsxRuntimeExports.jsx(Box,{sx:{width:"100%",height:"".concat(180,"px")},children:jsxRuntimeExports.jsx(ResourceCard,{onClick:function(){var e="ENGINE_CENTER_DETAILS",s={name:e,config:{name:"Engine Details",engineId:t.id,isReadOnly:r,isFullScreen:o}};a(mountPanel({panelId:e,microFrontend:s,panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:o?0:55,marginStart:o?0:80,size:"xlarge",parentPanelId:"RESOURCE_CENTER",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0}}))},height:"".concat(180,"px"),cardType:EResourceTypeValue.engine,name:null==t?void 0:t.name,description:null==t?void 0:t.description,avatarUrl:(null==t?void 0:t.signedIconPath)||(null==t?void 0:t.signedLogoPath),fallbackIcon:jsxRuntimeExports.jsx(Engines,{}),status:null==t?void 0:t.state,industries:null==t?void 0:t.industries,isCertified:null==t||null==(e=t.testingDetails)?void 0:e.isCertified,categoryClass:null==t||null==(e=t.category)||null==(e=e.type)?void 0:e.name,capability:null==t||null==(e=t.category)?void 0:e.name,package:null==t?void 0:t.resourcePackage,deploymentModel:null==t?void 0:t.deploymentModel,owner:null==t||null==(e=t.ownerOrganization)?void 0:e.name,price:null==t?void 0:t.price})})},MessageEmptyState:jsxRuntimeExports.jsx(l,{}),MessageErrorState:jsxRuntimeExports.jsx(c,{}),CustomEmptyStateImage:img$5})};export{IOAdaptersTable as default};
