import{bL as o,u as m,j as e,B as d,aX as u,b as f,bj as b,m as k,bX as a,s as C}from"./index-dP1W1_bd.js";import{a as g}from"./index-D4-3j93o.js";import{s as i}from"./kafka.styles-DePnZV6P.js";const R=()=>{const x=o(),{id:j,topicName:l}=m(),h={projectId:j,topicId:l},{data:t=[]}=g(h),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(k,{mb:"20px",title:"Partitions",children:e.jsxs(a,{hoverable:!1,children:[e.jsx("thead",{children:e.jsxs(a.Row,{sx:i.row,children:[e.jsx(a.HeadCell,{children:"partition id"}),e.jsx(a.HeadCell,{children:"partition leader"}),e.jsx(a.HeadCell,{children:"partion replicas"}),e.jsx(a.HeadCell,{fillSpace:!0,children:"insync replicas"})]})}),e.jsx("tbody",{children:t.map(s=>{var r,n;return e.jsxs(a.Row,{sx:i.bodyRow,children:[e.jsx(a.Cell,{children:s==null?void 0:s.id}),e.jsx(a.Cell,{children:s==null?void 0:s.leader}),e.jsx(a.Cell,{children:(r=s==null?void 0:s.replicas)==null?void 0:r.join(" | ")}),e.jsx(a.Cell,{children:(n=s==null?void 0:s.inSyncReplicas)==null?void 0:n.join(" | ")})]},s==null?void 0:s.id)})})]})})]})};export{R as default};
