var h=Object.defineProperty;var y=(t,e,a)=>e in t?h(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var p=(t,e,a)=>y(t,typeof e!="symbol"?e+"":e,a);import"../chunks/CWj6FrbW.js";import{p as w,V as n,f as I,a as _,I as i,s as D,c as S,r as L}from"../chunks/DBjB5OCe.js";import{t as $,a as C}from"../chunks/BPWik_uC.js";import{a as T,d as x}from"../chunks/DC36HjL5.js";import{P as k}from"../chunks/yXOiEPB1.js";import{p as m}from"../chunks/Bht2HYP4.js";import{E as M}from"../chunks/pfX60WpD.js";import{B as P,i as H,f as O}from"../chunks/AMrO_vpF.js";const R={name:"ClearDebugLog",kind:"HoudiniMutation",hash:"f9ed171b7931ec8be12901b7bfc04088f4f9809a247ee215b7a9cceac2aa163b",raw:`mutation ClearDebugLog($agentId: String!) {
  clearLog(agentId: $agentId) {
    agentId
  }
}
`,rootType:"Mutation",stripVariables:[],selection:{fields:{clearLog:{type:"DebugTrace",keyRaw:"clearLog(agentId: $agentId)",selection:{fields:{agentId:{type:"String",keyRaw:"agentId",visible:!0}}},visible:!0}}},pluginData:{"houdini-svelte":{}},input:{fields:{agentId:"String"},types:{},defaults:{},runtimeScalars:{}}};class j extends P{constructor(){super(...arguments);p(this,"kind","HoudiniMutation")}async mutate(a,{metadata:r,fetch:l,event:o,abortController:c,...g}={}){await H();const{context:s}=await O(this.artifact,this.artifact.name,{fetch:l,metadata:r,event:o});return await this.observer.send({variables:a,fetch:s.fetch,metadata:r,session:s.session,abortController:c,stuff:{...g}})}}class B extends j{constructor(){super({artifact:R})}}const Q=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));var E=$('<!> <div class="flex h-full w-full flex-col pr-4 pl-4 overflow-auto"><!></div>',1);function U(t,e){w(e,!0);const[a,r]=T(),l=()=>x(i(o),"$DebugTrace",a);n(()=>e.data.AgentConfig);let o=n(()=>e.data.DebugTrace),c=n(()=>l().data),g=n(()=>i(c).debugLog),s=new B;async function b(){confirm("Do you really want to clear the log?")&&(await s.mutate({agentId:m.params.id}),await i(o).fetch({policy:"NetworkOnly"}))}var u=E(),d=I(u);k(d,{get title(){return m.params.id}});var f=D(d,2),v=S(f);M(v,{get events(){return i(g).events},onClear:b}),L(f),C(t,u),_(),r()}export{U as component,Q as universal};
