import"../chunks/CWj6FrbW.js";import{D as y,p as b,u as N,f as m,s as p,b as u,c as A,d as l,r as o,t as F,g as c,h as S,i as D,e as H,$ as O}from"../chunks/DOPisAOl.js";import{e as P,c as R,A as T}from"../chunks/BsZvu73I.js";import{s as j}from"../chunks/Xc3_nZLd.js";import{e as q,i as z}from"../chunks/CO5ixKDf.js";import{c as B,s as E}from"../chunks/CGcWBEH0.js";import{s as G}from"../chunks/eylS3834.js";import{g as I}from"../chunks/BhT-mCxl.js";var J=(g,e,n)=>e.onAgentClick(c(n),g),K=m('<button><span class="agent-name svelte-16acuk9"> </span></button>'),L=m('<div class="agent-grid-container svelte-16acuk9"><div class="agent-grid svelte-16acuk9"><!> <button class="agent-card new-agent svelte-16acuk9" aria-label="Create new agent"><span class="agent-name agent-name_new svelte-16acuk9">New Agent</span></button></div></div>');function M(g,e){b(e,!0),N(()=>{P(e.agents)});const n=a=>a.split("/").at(-1)??a;var r=L(),i=l(r),v=l(i);q(v,17,()=>e.agents,z,(a,t)=>{var s=K();let f;s.__click=[J,e,t];var _=l(s),k=l(_,!0);o(_),o(s),F((h,x,C,w)=>{f=G(s,1,"agent-card svelte-16acuk9",null,f,h),B(s,`--agent-color: ${x??""}`),E(s,"aria-label",C),j(k,w)},[()=>({active:c(t)===e.currentAgent}),()=>R(c(t)),()=>`Open ${n(c(t))}`,()=>n(c(t))]),u(a,s)});var d=p(v,2);d.__click=function(...a){var t;(t=e.onNewAgent)==null||t.apply(this,a)},o(i),o(r),u(g,r),A()}y(["click"]);var Q=m('<div class="flex h-screen"><!> <div class="flex h-full min-w-0 flex-1 flex-col bg-rc-gray-700 py-2 pr-lg"><div class="flex-1"><!></div></div></div>');function te(g,e){b(e,!0);const{onAgentSelect:n}=I();let r=H(!1);var i=Q();S(s=>{O.title="Recombine Agents Hub"});var v=l(i);T(v,{className:"flex-none border-r-thin border-r-rc-gray-600",get agents(){return e.data.agents},currentAgent:"",onToggle:()=>D(r,!c(r)),get isCollapsed(){return c(r)},get onAgentClick(){return n}});var d=p(v,2),a=l(d),t=l(a);M(t,{get agents(){return e.data.agents},currentAgent:"",get onAgentClick(){return n}}),o(a),o(d),o(i),u(g,i),A()}export{te as component};
