import{c as p,u as f,f as m}from"./index-_B-Zy6Ft.js";import{a as v}from"./use-virtual-mcp-BDXCo80j.js";function x(s){const e=p.c(10);let n;e[0]!==s?(n=s===void 0?{}:s,e[0]=s,e[1]=n):n=e[1];const d=n,{navigateOnCreate:g}=d,a=g===void 0?!1:g,{org:r}=f(),c=m(),t=v();let i;e[2]!==t.create||e[3]!==c||e[4]!==a||e[5]!==r?(i=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"Agents let you securely expose integrated tools to the outside world.",status:"active",tool_selection_mode:"inclusion",connections:[]});return a&&c({to:"/$org/agents/$agentId",params:{org:r.slug,agentId:u.id}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=c,e[4]=a,e[5]=r,e[6]=i):i=e[6];const l=i;let o;return e[7]!==t.create.isPending||e[8]!==l?(o={createVirtualMCP:l,isCreating:t.create.isPending},e[7]=t.create.isPending,e[8]=l,e[9]=o):o=e[9],o}export{x as u};
