1import{r as _,j as e,aK as n,bK as c,bu as d,h as a,m as t,U as u,H as k,B as L,i as H,k as E,J as p}from"./index-DLd_kDlx.js";import{T as R,a as S,b,c as l,d as D,e as i}from"./table-BOJIo-OD.js";import{T as x}from"./TechLeadHeader-eLOg3V3h.js";import{u as M}from"./useTechLeadPods-CLIvfpn7.js";import{u as B}from"./usePodDeliveryPlan-Qtfzkd_A.js";import{R as f}from"./refresh-cw-CoPjtj5-.js";import{E as A}from"./external-link-D0CFvOTk.js";import"./dropdown-menu-DSd1c3Vk.js";import"./index-Deh-4PO1.js";import"./index-lTaZyIGy.js";import"./chevron-right-CD1gvy-q.js";import"./NotificationIcon-C1wwYnH5.js";import"./popover-BMD5FOmU.js";import"./scroll-area-BXTuUF24.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";import"./rotate-ccw-Bx1C64Ur.js";const de=()=>{const{pods:r,isLoading:N,error:o,refreshPods:m}=M(),{handlePodClick:v}=B();_.useEffect(()=>{r.length>0&&console.log("Current pods data:",r)},[r]);const y=s=>{switch(s){case"recruiting":return"bg-blue-100 text-blue-800";case"active":return"bg-green-100 text-green-800";case"completed":return"bg-gray-100 text-gray-800";case"cancelled":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}},w=s=>{switch(s){case"waiting_minimum":return"bg-yellow-100 text-yellow-800";case"active_recruiting":return"bg-blue-100 text-blue-800";case"kickoff_ready":return"bg-slate-100 text-xterns-navy";case"in_progress":return"bg-green-100 text-green-800";default:return"bg-gray-100 text-gray-800"}},C=s=>{switch(s){case"recruiting":return"hover:bg-blue-50 hover:border-blue-200";case"active":return"hover:bg-green-50 hover:border-green-200";case"completed":return"hover:bg-gray-50 hover:border-gray-200";case"cancelled":return"hover:bg-red-50 hover:border-red-200";default:return"hover:bg-gray-50 hover:border-gray-200"}};return N?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(x,{title:"Pod Management"}),e.jsx("main",{className:"p-8",children:e.jsxs("div",{className:"flex items-center justify-center h-32",children:[e.jsx(f,{className:"h-6 w-6 animate-spin"}),e.jsx("span",{className:"ml-2",children:"Loading pods..."})]})})]})]})}):o?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(x,{title:"Pod Management"}),e.jsx("main",{className:"p-8",children:e.jsx(a,{className:"border-red-200 bg-red-50",children:e.jsxs(t,{className:"p-6",children:[e.jsxs("div",{className:"text-red-800",children:["Error loading pods: ",o]}),e.jsx("button",{onClick:m,className:"mt-2 px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors",children:"Try Again"})]})})})]})]})}):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(x,{title:"Pod Management"}),e.jsx("main",{className:"p-8",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[e.jsx(a,{children:e.jsx(t,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Total Pods"}),e.jsx("p",{className:"text-2xl font-bold",children:r.length})]}),e.jsx(u,{className:"h-8 w-8 text-blue-600"})]})})}),e.jsx(a,{children:e.jsx(t,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Active Pods"}),e.jsx("p",{className:"text-2xl font-bold",children:r.filter(s=>s.status==="active").length})]}),e.jsx(k,{className:"h-8 w-8 text-green-600"})]})})}),e.jsx(a,{children:e.jsx(t,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-gray-600",children:"Recruiting"}),e.jsx("p",{className:"text-2xl font-bold",children:r.filter(s=>s.status==="recruiting").length})]}),e.jsx(A,{className:"h-8 w-8 text-xterns-navy"})]})})}),e.jsx(a,{children:e.jsx(t,{className:"p-4",children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsx("div",{children:e.jsxs(L,{onClick:m,variant:"outline",size:"sm",className:"w-full",children:[e.jsx(f,{className:"h-4 w-4 mr-2"}),"Refresh Data"]})})})})})]}),e.jsxs(a,{children:[e.jsx(H,{children:e.jsx(E,{children:"Your Pods"})}),e.jsx(t,{children:r.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-gray-500 mb-4",children:"No pods created yet"}),e.jsx("p",{className:"text-sm text-gray-400",children:"Create your first pod from the Project Hub"})]}):e.jsxs(R,{children:[e.jsx(S,{children:e.jsxs(b,{children:[e.jsx(l,{children:"Pod Name"}),e.jsx(l,{children:"Project"}),e.jsx(l,{children:"Xterns"}),e.jsx(l,{children:"Status"}),e.jsx(l,{children:"Phase"}),e.jsx(l,{children:"Deadline"})]})}),e.jsx(D,{children:r.map(s=>{var h,j,g;const P=Math.max(0,s.current_members-1),T=s.max_members-1;return e.jsxs(b,{onClick:()=>
1v(s.id),className:`cursor-pointer transition-all duration-200 transform hover:scale-[1.01] hover:shadow-md ${C(s.status)} border-l-4 border-l-transparent hover:border-l-current`,children:[e.jsx(i,{className:"font-medium",children:s.pod_name}),e.jsx(i,{children:e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:(h=s.projects)==null?void 0:h.title}),e.jsx("p",{className:"text-xs text-gray-500 line-clamp-1",children:(j=s.projects)==null?void 0:j.description})]})}),e.jsx(i,{children:e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsxs("span",{className:"font-medium text-blue-600",children:[P,"/",T]})]})}),e.jsx(i,{children:e.jsx(p,{className:y(s.status),children:s.status})}),e.jsx(i,{children:e.jsx(p,{variant:"outline",className:w(s.recruiting_phase),children:(g=s.recruiting_phase)==null?void 0:g.replace("_"," ")})}),e.jsx(i,{children:new Date(s.completion_deadline).toLocaleDateString()})]},s.id)})})]})})]})]})})]})]})})};export{de 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.