import{b1 as o,u as m,j as e,a as d,hp as u,c as f,bd as b,K as k,bc as s,e as C}from"./index-d6499a22.js";import{a as g}from"./index-0e1d5e0b.js";import{s as i}from"./kafka.styles-4e751247.js";const K=()=>{const x=o(),{id:c,topicName:l}=m(),h={projectId:c,topicId:l},{data:j=[]}=g(h),t=()=>x(C.project.settings.kafka.view);return e.jsxs(d,{flexDirection:"column",children:[e.jsx(u,{mr:"auto",mode:"highlight",onClick:t,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(k,{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:j.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};
