import{a as w}from"/build/_shared/chunk-W2OMR23Y.js";import{a as u}from"/build/_shared/chunk-J7ISLRHM.js";import{a as g,b as E}from"/build/_shared/chunk-WHOMLFI6.js";import{a as C,b as x,c as v,d as l,e as i,f as r}from"/build/_shared/chunk-EBHCYYOH.js";import{B as D,C as d,d as T,e as c}from"/build/_shared/chunk-XIQ3C74K.js";import{a as f}from"/build/_shared/chunk-LR6G3KVW.js";import{d as s}from"/build/_shared/chunk-G5WX4PPA.js";D();var o=s(d(),1),P=({experiment:a})=>{let m=T(),t=c(),{short:n,variant:b}=E(a.id),p=h=>{m(f.app.project.env.experimentsId({projectId:t.projectId,envId:t.envId,experimentId:h.id}))};return(0,o.jsxs)(l,{children:[(0,o.jsx)(r,{children:(0,o.jsxs)(g,{variant:b,className:"cursor-pointer",onClick:()=>{p(a)},children:[(0,o.jsx)(u,{}),"\xA0",n]})}),(0,o.jsx)(r,{children:a.name}),(0,o.jsx)(r,{children:a.description}),(0,o.jsx)(r,{children:a.createdAt})]},a.id)};var e=s(d(),1),A=({experiments:a,currentPage:m,totalCount:t,totalPages:n})=>(0,e.jsxs)("div",{children:[!!t&&m&&n&&(0,e.jsxs)("div",{className:"mb-2 flex justify-between",children:[(0,e.jsx)("div",{children:(0,e.jsxs)("span",{className:"text-muted-foreground text-sm",children:[t," experiment",t>=2?"s":""]})}),(0,e.jsx)(w,{currentPage:m,totalPages:n})]}),(0,e.jsxs)(C,{children:[(0,e.jsx)(x,{children:(0,e.jsxs)(l,{children:[(0,e.jsx)(i,{children:"ID"}),(0,e.jsx)(i,{children:"Name"}),(0,e.jsx)(i,{children:"Description"}),(0,e.jsx)(i,{children:"Created On"})]})}),(0,e.jsx)(v,{children:a.length?a.map(p=>(0,e.jsx)(P,{experiment:p},p.id)):(0,e.jsx)(l,{children:(0,e.jsx)(r,{colSpan:4,className:"h-24 text-center",children:"No experiments."})})})]})]});export{A as a};
