import{e as C,b as L,r as h,z as M,S as E,x as S,f as c,g as r,j as i,k as f,h as u,M as $,L as D,aO as H,H as O,n as T,p as l}from"./jwt-decode.esm-CzNJpMna.js";import{u as I}from"./omniChatStore-D4AqaYvz.js";import{O as X}from"./OmniChat-wGzbBRQp.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="0cdda265-a7d1-4570-b993-a8c90d2ea7a6",o._sentryDebugIdIdentifier="sentry-dbid-0cdda265-a7d1-4570-b993-a8c90d2ea7a6")}catch{}})();const z={key:0,class:"project-navbar"},B={class:"project-body"},A={key:0,class:"project-sidebar"},N={class:"project-content"},_=300,b=800,P=400,R=C({__name:"ProjectLayout",setup(o){const s=I(),t=L(()=>s.isOpen),d=h(),a=h(P),j=M.number(),p=new D(j,"console-chat-width"),n=h({active:!1,startX:0,startWidth:0});function k(){p.set(a.value)}function g(){const e=p.get();e&&e>=_&&e<=b&&(a.value=e)}function w(e){n.value.active=!0,n.value.startX=e.clientX,n.value.startWidth=a.value,document.addEventListener("mousemove",m),document.addEventListener("mouseup",v),document.body.style.cursor="col-resize",document.body.style.userSelect="none"}function m(e){if(!n.value.active)return;const y=n.value.startX-e.clientX,W=n.value.startWidth+y;a.value=Math.max(_,Math.min(b,W))}function v(){n.value.active=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",v),document.body.style.cursor="",document.body.style.userSelect="",k()}return E(()=>{g()}),S(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",v)}),(e,y)=>(r(),c("div",{ref_key:"layoutRef",ref:d,class:"project-layout"},[e.$slots.navbar?(r(),c("header",z,[u(e.$slots,"navbar",{},void 0,!0)])):i("",!0),f("section",B,[e.$slots.sidebar?(r(),c("aside",A,[u(e.$slots,"sidebar",{},void 0,!0)])):i("",!0),f("main",N,[u(e.$slots,"content",{},void 0,!0)]),e.$slots.chat&&t.value?(r(),c("div",{key:1,class:"resize-handle",onMousedown:w},null,32)):i("",!0),e.$slots.chat&&t.value?(r(),c("aside",{key:2,class:"project-chat",style:$({width:a.value+"px"})},[u(e.$slots,"chat",{},void 0,!0)],4)):i("",!0)])],512))}}),q=H(R,[["__scopeId","data-v-f23a654a"]]),G=C({__name:"ConsoleOmniChat",props:{projectId:{}},setup(o){const s=o,t=I();return O(()=>s.projectId,d=>t.init("console",d),{immediate:!0}),(d,a)=>l(t).controller&&l(t).repository?(r(),T(X,{key:0,"ai-chat-repository":l(t).repository,controller:l(t).controller,environment:{origin:"console",projectId:s.projectId},"show-console-suggestions":!0},null,8,["ai-chat-repository","controller","environment"])):i("",!0)}});export{q as P,G as _};
//# sourceMappingURL=ConsoleOmniChat.vue_vue_type_script_setup_true_lang-C6-Fggij.js.map
