import{j as a}from"./vendor-react-wBh_31cN.js";import{B as c}from"./back-button-zYdlGpWP.js";import{B as o}from"./badge-nyizWwTN.js";import{C as x,a as h,b as j,c as f}from"./card-DISTA6Ay.js";import{R as u,r as N}from"./index-BKr2rJhV.js";import{e as b}from"./index-470EV_bO.js";import{u as g}from"./useProjectNavigate-5znX7Ojg.js";import{c as y}from"./vendor-router-D1GqFWiT.js";import"./vendor-icons-BUUmD6ht.js";import"./vendor-utils-OeoE2qq_.js";import"./vendor-radix-BRyWS4bQ.js";import"./vendor-redux-CJZrIb6x.js";import"./vendor-grid-CeFlDWv4.js";const E=()=>{const l=g(),{id:n,topicName:r}=y(),d={projectId:n,topicId:r},{data:i=[]}=b(d),m=()=>l(N.project.settings.kafka.view);return a.jsxs("div",{className:"flex flex-col",children:[a.jsx(c,{className:"mr-auto",onClick:m,children:"back to all Kafka Topics"}),a.jsxs("div",{className:"my-5 flex items-center",children:[a.jsx(u,{gray:!0,bold:!0,className:"mr-5 text-lg",children:r}),a.jsx(o,{variant:"secondary",children:"Kafka Topic"})]}),a.jsxs(x,{className:"mb-5",children:[a.jsx(h,{children:a.jsx(j,{children:"Partitions"})}),a.jsx(f,{children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"h-12 border-b",children:[a.jsx("th",{className:"text-left font-normal text-quartz-gray",children:"partition id"}),a.jsx("th",{className:"text-left font-normal text-quartz-gray",children:"partition leader"}),a.jsx("th",{className:"text-left font-normal text-quartz-gray",children:"partion replicas"}),a.jsx("th",{className:"text-left font-normal text-quartz-gray",children:"insync replicas"})]})}),a.jsx("tbody",{children:i.map(e=>{var s,t;return a.jsxs("tr",{className:"h-12 border-b text-xs",children:[a.jsx("td",{children:e==null?void 0:e.id}),a.jsx("td",{children:e==null?void 0:e.leader}),a.jsx("td",{children:(s=e==null?void 0:e.replicas)==null?void 0:s.join(" | ")}),a.jsx("td",{children:(t=e==null?void 0:e.inSyncReplicas)==null?void 0:t.join(" | ")})]},e==null?void 0:e.id)})})]})})]})]})};export{E as default};
