import{bg as o,u as m,j as e,d,f_ as u,y as f,aN as b,Q as y,bw as s,q as C}from"./index-CK33qGU_.js";import{a as k}from"./index-CBcuRugC.js";import{s as i}from"./kafka.styles-DePnZV6P.js";const K=()=>{const x=o(),{id:h,topicName:l}=m(),j={projectId:h,topicId:l},{data:t=[]}=k(j),c=()=>x(C.project.settings.kafka.view);return e.jsxs(d,{flexDirection:"column",children:[e.jsx(u,{mr:"auto",mode:"highlight",onClick:c,children:"<- back to all Kafka Topics"}),e.jsxs(d,{my:"20px",alignItems:"center",children:[e.jsx(f,{gray:!0,bold:!0,mr:"20px",fontSize:"18px",children:l}),e.jsx(b,{variant:"light",mode:"bordered",value:"Kafka Topic",children:"Kafka Topic"})]}),e.jsx(y,{mb:"20px",title:"Partitions",children:e.jsxs(s,{hoverable:!1,children:[e.jsx("thead",{children:e.jsxs(s.Row,{sx:i.row,children:[e.jsx(s.HeadCell,{children:"partition id"}),e.jsx(s.HeadCell,{children:"partition leader"}),e.jsx(s.HeadCell,{children:"partion replicas"}),e.jsx(s.HeadCell,{fillSpace:!0,children:"insync replicas"})]})}),e.jsx("tbody",{children:t.map(a=>{var r,n;return e.jsxs(s.Row,{sx:i.bodyRow,children:[e.jsx(s.Cell,{children:a==null?void 0:a.id}),e.jsx(s.Cell,{children:a==null?void 0:a.leader}),e.jsx(s.Cell,{children:(r=a==null?void 0:a.replicas)==null?void 0:r.join(" | ")}),e.jsx(s.Cell,{children:(n=a==null?void 0:a.inSyncReplicas)==null?void 0:n.join(" | ")})]},a==null?void 0:a.id)})})]})})]})};export{K as default};
