import{a as p,b as S}from"./chunk-M5BQLRS6.js";import{Hc as d,Jb as h,Kc as g,Lc as f,Qb as m,Za as c,be as y,uc as o,vc as r,wc as v,xb as l}from"./chunk-WL5U2YIT.js";import{e as w}from"./chunk-ADEKKGI2.js";var b,x,R,I=w(()=>{S();y();b=[[["","moduleNav",""]],[["","moduleContent",""]]],x=["[moduleNav]","[moduleContent]"],R=(()=>{let t=class t{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(t.storageKey),i=e?parseInt(e,10):t.defaultWidth;this.setNavWidth(i)}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 i=this.latestClientX-this.dragStartX,n=Math.min(400,Math.max(160,this.dragStartWidth+i));this.setNavWidth(n)})))}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(t.storageKey,String(e))}setNavWidth(e){this.elementRef.nativeElement.style.setProperty("--module-nav-width",`${e}px`)}};t.storageKey="dvls-module-nav-width",t.defaultWidth=230,t.\u0275fac=function(i){return new(i||t)(h(c))},t.\u0275cmp=m({type:t,selectors:[["dvls-module-layout"]],hostAttrs:[1,"flex","flex-1","h-full","min-h-0",2,"--module-nav-width","230px"],hostBindings:function(i,n){i&1&&d("mousemove",function(s){return n.onResizeMove(s)},l)("mouseup",function(){return n.onResizeEnd()},l)},ngContentSelectors:x,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(i,n){i&1&&(g(b),o(0,"aside",0),f(1),r(),o(2,"div",1),d("mousedown",function(s){return n.onResizeStart(s)}),r(),o(3,"div",2),v(4,"dvl-long-operation-indicator"),f(5,1),r())},dependencies:[p],encapsulation:2});let a=t;return a})()});export{R as a,I as b};
