import{e as I,b as L,r as h,z as E,Q as M,P as $,f as c,g as r,j as i,k as y,h as d,I as D,L as S,aO as O,F as T,n as X,p as l}from"./jwt-decode.esm-CW-ehmUm.js";import{u as C}from"./omniChatStore-Dalui0bJ.js";import{O as z}from"./OmniChat-djc5W4EV.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]="7300c37f-cfd9-4f1c-a766-ed1cbbcf36ca",o._sentryDebugIdIdentifier="sentry-dbid-7300c37f-cfd9-4f1c-a766-ed1cbbcf36ca")}catch{}})();const B={key:0,class:"project-navbar"},H={class:"project-body"},A={key:0,class:"project-sidebar"},P={class:"project-content"},_=300,b=800,N=400,R=I({__name:"ProjectLayout",setup(o){const s=C(),t=L(()=>s.isOpen),u=h(),a=h(N),j=E.number(),p=new S(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 f=n.value.startX-e.clientX,W=n.value.startWidth+f;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,f)=>(r(),c("div",{ref_key:"layoutRef",ref:u,class:"project-layout"},[e.$slots.navbar?(r(),c("header",B,[d(e.$slots,"navbar",{},void 0,!0)])):i("",!0),y("section",H,[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))}}),Q=O(R,[["__scopeId","data-v-460dc297"]]),q=I({__name:"ConsoleOmniChat",props:{projectId:{}},setup(o){const s=o,t=C();return T(()=>s.projectId,u=>t.init("console",u),{immediate:!0}),(u,a)=>l(t).controller&&l(t).repository?(r(),X(z,{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,q as _};
//# sourceMappingURL=ConsoleOmniChat.vue_vue_type_script_setup_true_lang-DyQkgdNM.js.map
