1import{o as C,u as k,j as e,aK as n,bt as c,bu as d,B as t,h as o,m,T as B,i as L,k as P,J as j,H as D,a4 as N,e as _}from"./index-DLd_kDlx.js";import{u as A}from"./usePodManagement-CP5ffjdL.js";import{u as I}from"./useSprintManagement-C4IIF8L2.js";import{N as T}from"./NotificationIcon-C1wwYnH5.js";import{A as x}from"./arrow-left-BXtn7MCa.js";import{L as H}from"./loader-circle-D2miE2xB.js";import{C as M}from"./circle-play-CGUr0fM_.js";import"./usePodDetails-C9Suehy1.js";import"./usePodMembers-8OtOtFCP.js";import"./useRoadmapData-uoMx8Hqe.js";import"./popover-BMD5FOmU.js";import"./scroll-area-BXTuUF24.js";import"./index-Deh-4PO1.js";import"./index-BdQq_4o_.js";import"./NotificationItem-Dc2WXW-y.js";import"./formatDistanceToNow-57P64IbE.js";import"./en-US-9SRVm7yB.js";import"./differenceInCalendarMonths-BA0TPVs2.js";import"./endOfDay-DkR3ZXc8.js";import"./endOfMonth-CYn6pTOm.js";import"./message-square-CtxeCfRz.js";import"./trophy-DBX-jNOC.js";import"./triangle-alert-Chqk_WK7.js";function le(){const[b]=C(),r=k(),a=b.get("pod");if(!a)return r("/xterns/sprint-board"),null;const{podDetails:h,isLoading:u}=A(a),{sprints:i,isLoading:f}=I(a),l=()=>{r("/xterns/sprint-board")},v=s=>{r(`/xterns/sprint-board-swimlanes?pod=${a}&sprint=${s}`)},y=s=>{switch(s){case"active":return"bg-green-100 text-green-800";case"completed":return"bg-blue-100 text-blue-800";case"not_started":return"bg-gray-100 text-gray-800";default:return"bg-gray-100 text-gray-800"}},w=s=>{switch(s){case"active":return e.jsx(M,{className:"w-4 h-4"});case"completed":return e.jsx(_,{className:"w-4 h-4"});case"not_started":return e.jsx(N,{className:"w-4 h-4"});default:return e.jsx(N,{className:"w-4 h-4"})}};return u||f?e.jsx(n,{children:e.jsxs("div",{className:"min-h-screen flex w-full bg-gray-50",children:[e.jsx(c,{}),e.jsxs(d,{className:"flex-1",children:[e.jsx("div",{className:"p-8 bg-white border-b",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(t,{variant:"ghost",onClick:l,children:[e.jsx(x,{className:"w-4 h-4 mr-2"}),"Back to Sprint Board"]}),e.jsx("h1",{className:"text-2xl font-semibold",children:"Sprint Selection"})]})}),e.jsx("main",{className:"p-8",children:e.jsxs("div",{className:"flex items-center justify-center h-32",children:[e.jsx(H,{className:"h-6 w-6 animate-spin"}),e.jsx("span",{className:"ml-2",children:"Loading sprints..."})]})})]})]})}):h?e.jsx(n,{children:e.jsxs("div",{className:"min-h-screen flex w-full bg-gray-50",children:[e.jsx(c,{}),e.jsxs(d,{className:"flex-1",children:[e.jsxs("div",{className:"bg-white border-b border-gray-200 px-8 py-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs(t,{variant:"ghost",onClick:l,children:[e.jsx(x,{className:"w-4 h-4 mr-2"}),"Back to Sprint Board"]}),e.jsx(T,{})]}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Sprint Selection"}),e.jsxs("p",{className:"text-gray-600 mt-1",children:["Select a sprint to view detailed progress for ",e.jsx("strong",{children:h.pod_name})]})]})]}),e.jsx("main",{className:"p-8",children:i.length===0?e.jsx(o,{children:e.jsxs(m,{className:"p-12 text-center",children:[e.jsx(B,{className:"h-16 w-16 text-gray-400 mx-auto mb-4"}),e.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No Sprints Available"}),e.jsx("p",{className:"text-gray-600 mb-6 max-w-md mx-auto",children:"This pod doesn't have any sprints created yet. Check with your tech lead about sprint planning."})]})}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:["Available Sprints (",i.length,")"]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:i.map(s=>{var g,p;return e.jsxs(o,{className:"hover:shadow-lg transition-all duration-200 cursor-pointer border-l-4 border-l-blue-500",children:[e.jsx(L,{className:"pb-4",children:e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex-1",children:[e.jsx(P,{className:"text-lg font-semibold text-gray-900 mb-2",children:s.name}),e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx(j,{className:y(s.status),children:e.jsxs("div",{className:"flex items-center gap-1",children:[w(s.status),e.jsx("span",{className:"capitalize",children:s.status})]})}),e.jsxs(j,{variant:"outline",children:["Sprint #",s.sprint_number]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[e.jsx(D,{className:"w-4 h-4"}),e.jsxs("span",{children:[new Date(s.start_date).toLocaleDateString()," -",new Date(s.end_date).toLocaleDateString()]})]})]})})}),e.jsx(m,{className:"pt-0",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 py-3 bg-gray-50 rounded-lg px-3",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-lg font-semibold text-blue-600",children:((g=s.stories)==null?void 0:g.length)||0}),e.jsx("div",{className:"text-xs text-gray-600",children:"Stories"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-lg font-semibold text-green-600",children:((p=s.stories)==null?void 0:p.filter(S=>S.status==="done").length)||0}),e.jsx("div",{className:"text-xs text-gray-600",children:"Completed"})]})]}),e.jsx(t,{onClick:()=>v(s.id),className:"w-full bg-blue-600 hover:bg-blue-700",children:"View Sprint Details"})]})})]},s.id)})})]})})]})]})}):e.jsx(n,{children:e.jsxs("div",{className:"min-h-screen flex w-full bg-gray-50",children:[e.jsx(c,{}),e.jsxs(d,{className:"flex-1",children:[e.jsx("div",{className:"p-8 bg-white border-b",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs(t,{variant:"ghost",onClick:l,children:[e.jsx(x,{className:"w-4 h-4 mr-2"}),"Back to Sprint Board"]}),e.jsx("h1",{className:"text-2xl font-semibold",children:"Sprint Selection"})]})}),e.jsx("main",{className:"p-8",children:e.jsx(o,{className:"border-red-200 bg-red-50",children:e.jsx(m,{className:"p-6",children:e.jsx("p",{className:"text-red-600",children:"Pod not found. Please try again."})})})})]})]})})}export{le as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.