import{j as e,a as s,M as P,u as A,b as O,l as L,r as l,K as S,f as h,c as b,d as U,O as V,V as v,Z as G,_,S as W,R as o,e as r,N as C,g as I}from"./index-d6499a22.js";import{F as N}from"./FeatureGroupListContent-3efe90a6.js";import{F as M}from"./FeatureViewsListContent-195ced2c.js";import{F as $}from"./FeatureDrawer-bd460a1c.js";import{W as k}from"./TableCells-4f9e6477.js";import"./FilterResult-550b3b9f.js";import"./Deprecated-ec8916ed.js";import"./CardActionButton-ccf1bc35.js";import"./CardLabels-69397116.js";import"./FeatureGroupTypeBadge-0a81479c.js";import"./useFeatureGroups-9d8b1765.js";import"./index-6716d449.js";import"./TagsSection-169ba331.js";import"./SchematisedTags-747f8809.js";import"./useUserPermissions-3851a25d.js";import"./index-da50fbe6.js";import"./file-utils-b5704e1c.js";import"./useCurrentProject-b23444be.js";import"./useProject-0d0fdeb3.js";import"./StatisticsTables-f4036ad4.js";import"./generateCategoricalChart-1633db29.js";import"./index-ddf2d065.js";import"./index-038a72d6.js";import"./point-ea70dc51.js";const u=({subject:t})=>e.jsx(s,{justifyContent:"center",alignItems:"center",width:"100%",children:e.jsx(P,{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(N,{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(M,{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(z,{...i}))})}):e.jsx(u,{subject:"features"}),z=({name:t,featuregroup:i,version:j,parentProjectName:T="",parentProjectId:c,highlights:w,featurestoreId:d})=>{const{id:y}=A(),{data:p}=O(),[x,f]=L(),m=p==null?void 0:p.map(({projectId:D})=>D),R=l.useId(),a=!(m!=null&&m.includes(c));return e.jsxs(e.Fragment,{children:[x&&!a&&e.jsx($,{isOpen:x,handleToggle:f,projectId:c,featurestoreId:d,fgName:i,parentProjectId:c,name:t,version:j}),e.jsx(k,{highlights:w,isSelected:x,isLocked:a,onClick:a?void 0:f,children:e.jsx(S,{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(b,{ml:"20px",gray:!0,children:"from"}),e.jsx(h,{ml:"5px",children:i}),e.jsxs(h,{ml:"5px",children:["version ",j]}),!y&&e.jsx(U,{ml:"10px",mt:"-5px",height:"32px",value:T,isLock:a})]})]}),!a&&e.jsx(V,{sx:{button:{border:"none"},svg:{fontSize:"12px !important"}},ml:"20px",children:e.jsx(v,{tooltip:"Open drawer",icon:G.eye})})]})})},`${R}-${d}`)]})},n=l.lazy(()=>_(()=>import("./DeepSearchDocType-4ed5f972.js"),["assets/DeepSearchDocType-4ed5f972.js","assets/index-d6499a22.js","assets/LoadMore-9cb7b710.js"])),H=()=>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(H);export{de as default};
