import{u as c,b as o,c as r,j as n}from"./vendor-query-B2UbickB.js";import{b as i}from"./index-_BRA9uFL.js";import{R as l,aa as p}from"./vendor-icons-Doy0g69_.js";function b(e){return c({queryKey:["agent-subscriptions",e],queryFn:()=>i(`/agents/${e}/subscriptions`),enabled:!!e})}function g(){const e=o();return r({mutationFn:({agentId:t,...s})=>i(`/agents/${t}/subscriptions`,{method:"POST",body:JSON.stringify(s)}),onSuccess:(t,s)=>{e.invalidateQueries({queryKey:["agent-subscriptions",s.agentId]}),e.invalidateQueries({queryKey:["agents"]})}})}function f(){const e=o();return r({mutationFn:({agentId:t,subId:s,...a})=>i(`/agents/${t}/subscriptions/${s}`,{method:"PUT",body:JSON.stringify(a)}),onSuccess:(t,s)=>{e.invalidateQueries({queryKey:["agent-subscriptions",s.agentId]})}})}function h(){const e=o();return r({mutationFn:({agentId:t,subId:s})=>i(`/agents/${t}/subscriptions/${s}`,{method:"DELETE"}),onSuccess:(t,s)=>{e.invalidateQueries({queryKey:["agent-subscriptions",s.agentId]}),e.invalidateQueries({queryKey:["agents"]})}})}const y={task:"text-blue-400",workflow:"text-accent",escalation:"text-amber-400",activity:"text-cyan-400",knowledge:"text-violet-400",agent:"text-emerald-400",app:"text-rose-400",milestone:"text-violet-400"};function q({topic:e}){const t=e.split("."),s=t[0]==="system"?t[1]:t[0],a=y[s]??"text-text-quaternary",u=t[0]==="system"?`${t[1]}.${t[t.length-1]}`:t.slice(-2).join(".");return n.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] font-mono text-text-secondary",children:[n.jsx(l,{className:`w-2.5 h-2.5 shrink-0 ${a}`,strokeWidth:1.5}),u]})}function C({cron:e}){return n.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] font-mono text-text-secondary",children:[n.jsx(p,{className:"w-2.5 h-2.5 shrink-0 text-text-quaternary",strokeWidth:1.5}),e]})}export{C,q as E,g as a,f as b,h as c,b as u};
//# sourceMappingURL=CronLabel-BdE6mHyA.js.map
