import{j as e,Q as s,Y as R,u as D,a as L,P as S,r as l,E as G,g as h,x as O,L as b,o as v,A as U,z as V,_,S as W,R as o,b as r,N as C,c as I}from"./index-ea7817a2.js";import{F as z}from"./FeatureGroupListContent-7f03b078.js";import{F as N}from"./FeatureViewsListContent-cfc4da58.js";import{F as $}from"./FeatureDrawer-3d4004d7.js";import{W as k}from"./TableCells-0706f7f1.js";import"./FilterResult-9d9dd7e5.js";import"./Deprecated-9bfe2e44.js";import"./CardActionButton-6aa39bc1.js";import"./CardLabels-5b55b182.js";import"./FeatureGroupTypeBadge-0e65ce60.js";import"./useFeatureGroups-2f66c5f0.js";import"./index-6ffd126a.js";import"./TagsSection-6ccbe40a.js";import"./SchematisedTags-a748e3d3.js";import"./useUserPermissions-d2903885.js";import"./index-8f672200.js";import"./file-utils-a5f053e8.js";import"./useCurrentProject-0132f110.js";import"./useProject-77619fff.js";import"./StatisticsTables-d20123a2.js";import"./generateCategoricalChart-e28fa4a2.js";import"./index-43e7382e.js";import"./index-1c428bf7.js";import"./point-ea70dc51.js";const u=({subject:t})=>e.jsx(s,{justifyContent:"center",alignItems:"center",width:"100%",children:e.jsx(R,{children:`0 ${t} match with the filters`})}),g=({data:t,loading:i})=>!t||!(t!=null&&t.length)?e.jsx(u,{subject:"feature groups"}):e.jsx(s,{margin:"0 auto",width:"100%",mx:"150px",maxWidth:"1200px",flexDirection:"column",children:e.jsx(s,{width:"100%",margin:"0 auto",marginTop:"2px",flexDirection:"column",children:e.jsx(z,{data:t,loading:i,hasMatchText:!0})})}),E=({data:t})=>t.length?e.jsx(s,{margin:"0 auto",mx:"150px",mt:"2px",width:"100%",maxWidth:"1200px",flexDirection:"column",children:e.jsx(N,{data:t,isFiltered:!1})}):e.jsx(u,{subject:"feature view"}),F=({data:t})=>t.length?e.jsx(s,{width:"100%",margin:"0 auto",maxWidth:"1200px",mx:"150px",flexDirection:"column",children:e.jsx(s,{p:"5px",flexDirection:"column",sx:{gap:"20px"},"data-test":"features-container",children:t.map(i=>e.jsx(H,{...i}))})}):e.jsx(u,{subject:"features"}),H=({name:t,featuregroup:i,version:j,parentProjectName:T="",parentProjectId:a,highlights:w,featurestoreId:d})=>{const{id:y}=D(),{data:p}=L(),[x,f]=S(),m=p==null?void 0:p.map(({projectId:A})=>A),P=l.useId(),c=!(m!=null&&m.includes(a));return e.jsxs(e.Fragment,{children:[x&&!c&&e.jsx($,{isOpen:x,handleToggle:f,projectId:a,featurestoreId:d,fgName:i,parentProjectId:a,name:t,version:j}),e.jsx(k,{highlights:w,isSelected:x,isLocked:c,onClick:c?void 0:f,children:e.jsx(G,{contentProps:{sx:{p:"0px !important"}},children:e.jsxs(s,{px:"20px",bg:"white",height:"60px",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(s,{children:[e.jsx(h,{lineHeight:"60px",fontSize:"18px",children:t}),e.jsxs(s,{mt:"25px",children:[e.jsx(O,{ml:"20px",gray:!0,children:"from"}),e.jsx(h,{ml:"5px",children:i}),e.jsxs(h,{ml:"5px",children:["version ",j]}),!y&&e.jsx(b,{ml:"10px",mt:"-5px",height:"32px",value:T,isLock:c})]})]}),!c&&e.jsx(v,{sx:{button:{border:"none"},svg:{fontSize:"12px !important"}},ml:"20px",children:e.jsx(U,{tooltip:"Open drawer",icon:V.eye})})]})})},`${P}-${d}`)]})},n=l.lazy(()=>_(()=>import("./DeepSearchDocType-0b05fd8d.js"),["assets/DeepSearchDocType-0b05fd8d.js","assets/index-ea7817a2.js","assets/LoadMore-dfb61caa.js"])),Q=()=>e.jsxs(W,{children:[e.jsx(o,{path:r.search.features.searchOneProject,element:e.jsx(n,{docType:"FEATURE",component:F})}),e.jsx(o,{path:r.search.features.searchAllProjects,element:e.jsx(n,{docType:"FEATURE",component:F})}),e.jsx(o,{path:r.search.featureGroups.searchOneProject,element:e.jsx(n,{docType:"FEATUREGROUP",component:g})}),e.jsx(o,{path:r.search.featureGroups.searchAllProjects,element:e.jsx(n,{docType:"FEATUREGROUP",component:g})}),e.jsx(o,{path:r.search.featureViews.searchOneProject,element:e.jsx(n,{docType:"FEATUREVIEW",component:E})}),e.jsx(o,{path:r.search.featureViews.searchAllProjects,element:e.jsx(n,{docType:"FEATUREVIEW",component:E})}),e.jsx(o,{path:"*",element:e.jsx(C,{to:I(r.search.featureGroups.searchAllProjects,r.search.value)})})]}),de=l.memo(Q);export{de as default};
