import {G,H}from'./chunk-BBMAB2Om.js';import {J,c as tS,w as wo,ca as yo,f as QT,dW as h_,a0 as ks,dX as g_,a2 as Uu,a3 as Py,a1 as Ny,bX as bb}from'./main-WUGO6e7n.js';var S,b,I,D=J(()=>{G();tS();S=[[["","moduleNav",""]],[["","moduleContent",""]]],b=["[moduleNav]","[moduleContent]"],I=(()=>{class n{static{this.storageKey="dvls-module-nav-width";}static{this.defaultWidth=230;}constructor(e){this.elementRef=e,this.isDragging=!1,this.dragStartX=0,this.dragStartWidth=0,this.latestClientX=0,this.rafId=null;}ngOnInit(){let e=localStorage.getItem(n.storageKey),t=e?parseInt(e,10):n.defaultWidth;this.setNavWidth(t);}onResizeStart(e){this.isDragging=!0,this.dragStartX=e.clientX,this.dragStartWidth=parseInt(getComputedStyle(this.elementRef.nativeElement).getPropertyValue("--module-nav-width"),10),e.preventDefault();}onResizeMove(e){this.isDragging&&(this.latestClientX=e.clientX,this.rafId===null&&(this.rafId=requestAnimationFrame(()=>{this.rafId=null;let t=this.latestClientX-this.dragStartX,i=Math.min(400,Math.max(160,this.dragStartWidth+t));this.setNavWidth(i);})));}onResizeEnd(){if(!this.isDragging)return;this.isDragging=!1,this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null);let e=parseInt(getComputedStyle(this.elementRef.nativeElement).getPropertyValue("--module-nav-width"),10);localStorage.setItem(n.storageKey,String(e));}setNavWidth(e){this.elementRef.nativeElement.style.setProperty("--module-nav-width",`${e}px`);}static{this.\u0275fac=function(t){return new(t||n)(wo(yo))};}static{this.\u0275cmp=QT({type:n,selectors:[["dvls-module-layout"]],hostAttrs:[1,"flex","flex-1","h-full","min-h-0",2,"--module-nav-width","230px"],hostBindings:function(t,i){t&1&&Py("mousemove",function(a){return i.onResizeMove(a)},bb)("mouseup",function(){return i.onResizeEnd()},bb);},ngContentSelectors:b,decls:6,vars:0,consts:[[1,"customScroll","flex","flex-col","w-[var(--module-nav-width)]","min-w-40","h-full","overflow-y-auto","pt-3","px-2","pb-2","border-r","border-[var(--border-100)]","flex-shrink-0"],[1,"flex-shrink-0","relative","w-0","h-full","cursor-col-resize","z-50","before:content-['']","before:absolute","before:inset-y-0","before:-left-1","before:w-1.5","hover:after:content-['']","hover:after:absolute","hover:after:inset-y-0","hover:after:-left-px","hover:after:w-0.5","hover:after:bg-[var(--accent-brand-400)]","hover:after:opacity-50","active:after:content-['']","active:after:absolute","active:after:inset-y-0","active:after:-left-px","active:after:w-0.5","active:after:bg-[var(--accent-brand-400)]","active:after:opacity-50",3,"mousedown"],[1,"flex-1","min-w-0","h-full","overflow-auto","flex","flex-col","relative"]],template:function(t,i){t&1&&(h_(S),ks(0,"aside",0),g_(1),Uu(),ks(2,"div",1),Py("mousedown",function(a){return i.onResizeStart(a)}),Uu(),ks(3,"div",2),Ny(4,"dvl-long-operation-indicator"),g_(5,1),Uu());},dependencies:[H],encapsulation:2,changeDetection:1});}}return n})();});export{D,I};