import{e as C,b as L,r as h,z as M,M as E,K as $,f as c,g as r,j as i,k as y,h as d,F as D,L as S,aM as T,C as X,n as z,p as l}from"./jwt-decode.esm-C7p7KYmD.js";import{u as I}from"./omniChatStore-CKovejdx.js";import{O as B}from"./OmniChat-CG5dDK0r.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]="c6d17a89-23eb-47be-b80f-c015ad8c5ad5",o._sentryDebugIdIdentifier="sentry-dbid-c6d17a89-23eb-47be-b80f-c015ad8c5ad5")}catch{}})();const H={key:0,class:"project-navbar"},O={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),u=h(),a=h(P),j=M.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 E(()=>{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",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",N,[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))}}),K=T(R,[["__scopeId","data-v-460dc297"]]),q=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{K as P,q as _};
//# sourceMappingURL=ConsoleOmniChat.vue_vue_type_script_setup_true_lang-B1IYUUDW.js.map
