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-4a12e52c.js";import{F as N}from"./FeatureGroupListContent-5bda7893.js";import{F as M}from"./FeatureViewsListContent-8a3f1202.js";import{F as $}from"./FeatureDrawer-0f36efe4.js";import{W as k}from"./TableCells-81114a6e.js";import"./FilterResult-127dcdca.js";import"./Deprecated-f408f795.js";import"./CardActionButton-e444b6e2.js";import"./CardLabels-1625aabd.js";import"./FeatureGroupTypeBadge-15dd5814.js";import"./useFeatureGroups-ade5fa03.js";import"./index-5e7fe491.js";import"./TagsSection-da691a08.js";import"./SchematisedTags-eb8a6634.js";import"./useUserPermissions-de4f332a.js";import"./index-1b686e0d.js";import"./file-utils-37d8d953.js";import"./useCurrentProject-9bb1c6a4.js";import"./useProject-04893095.js";import"./StatisticsTables-efa2bf60.js";import"./generateCategoricalChart-243e9fb9.js";import"./index-91a459dc.js";import"./index-e10b6a93.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-20d2b1ef.js"),["assets/DeepSearchDocType-20d2b1ef.js","assets/index-4a12e52c.js","assets/LoadMore-1053c26e.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};
