import{e as C,b as L,r as h,z as E,n as M,l as $,f as c,g as r,j as i,k as y,h as d,G as D,L as S,ar as T,P as X,q as z,s as l}from"./jwt-decode.esm-CX61wVx3.js";import{u as I}from"./omniChatStore-_8KZabY3.js";import{O as B}from"./OmniChat-C80jX_ES.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]="3f37c60f-e32f-441f-81e3-551edbaeb3fb",o._sentryDebugIdIdentifier="sentry-dbid-3f37c60f-e32f-441f-81e3-551edbaeb3fb")}catch{}})();const H={key:0,class:"project-navbar"},O={class:"project-body"},A={key:0,class:"project-sidebar"},P={class:"project-content"},_=300,b=800,N=400,R=C({__name:"ProjectLayout",setup(o){const s=I(),t=L(()=>s.isOpen),u=h(),a=h(N),j=E.number(),f=new S(j,"console-chat-width"),n=h({active:!1,startX:0,startWidth:0});function k(){f.set(a.value)}function g(){const e=f.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 p=n.value.startX-e.clientX,W=n.value.startWidth+p;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 M(()=>{g()}),$(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",v)}),(e,p)=>(r(),c("div",{ref_key:"layoutRef",ref:u,class:"project-layout"},[e.$slots.navbar?(r(),c("header",H,[d(e.$slots,"navbar",{},void 0,!0)])):i("",!0),y("section",O,[e.$slots.sidebar?(r(),c("aside",A,[d(e.$slots,"sidebar",{},void 0,!0)])):i("",!0),y("main",P,[d(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:D({width:a.value+"px"})},[d(e.$slots,"chat",{},void 0,!0)],4)):i("",!0)])],512))}}),F=T(R,[["__scopeId","data-v-460dc297"]]),G=C({__name:"ConsoleOmniChat",props:{projectId:{}},setup(o){const s=o,t=I();return X(()=>s.projectId,u=>t.init("console",u),{immediate:!0}),(u,a)=>l(t).controller&&l(t).repository?(r(),z(B,{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{F as P,G as _};
//# sourceMappingURL=ConsoleOmniChat.vue_vue_type_script_setup_true_lang-DxvgVvmL.js.map
