import{a as M,b as D}from"./chunk-5TTXT2K2.js";import{$b as T,Bb as h,Db as p,Ib as m,Jb as f,Kb as o,La as c,Lb as u,Sd as y,Yc as r,Za as d,Zb as b,_b as v,ib as l,kb as g,mc as x,nc as C,ra as s}from"./chunk-GJDGQISV.js";var a=class e{elementId;activatedRoute=s(y);elementRef=s(c);fragmentSubscription;highlightTimeout;ngOnInit(){this.checkAndHighlightElement(),this.fragmentSubscription=this.activatedRoute.fragment.subscribe(t=>{t&&t===this.elementId&&this.highlightElement()})}ngOnDestroy(){this.fragmentSubscription?.unsubscribe(),this.highlightTimeout&&clearTimeout(this.highlightTimeout)}checkAndHighlightElement(){let t=this.activatedRoute.snapshot.fragment;t&&t===this.elementId&&setTimeout(()=>this.highlightElement(),100)}highlightElement(){let t=this.elementRef.nativeElement;t.classList.remove("fragment-highlight-fadeout"),t.classList.add("fragment-highlight"),t.scrollIntoView({behavior:"smooth",block:"center"}),this.highlightTimeout&&clearTimeout(this.highlightTimeout),this.highlightTimeout=setTimeout(()=>{t.classList.remove("fragment-highlight"),t.classList.add("fragment-highlight-fadeout"),setTimeout(()=>{t.classList.remove("fragment-highlight-fadeout")},500)},2e3)}static \u0275fac=function(i){return new(i||e)};static \u0275dir=g({type:e,selectors:[["","fragmentHighlight",""]],inputs:{elementId:[0,"fragmentHighlight","elementId"]}})};var _=["*"];function P(e,t){if(e&1&&u(0,"i",4),e&2){let i=b();m("matTooltip",i.description())}}var I=class e{cardTitle=r("");description=r("");id=r("");static \u0275fac=function(i){return new(i||e)};static \u0275cmp=l({type:e,selectors:[["POS-card"]],inputs:{cardTitle:[1,"cardTitle"],description:[1,"description"],id:[1,"id"]},ngContentSelectors:_,decls:7,vars:4,consts:[[1,"card","mb-6","border",3,"fragmentHighlight","id"],[1,"card-body"],[1,"card-headers","d-flex","gap-2","align-items-center"],[1,"card-title","fw-bold"],["matTooltipPosition","above",1,"fa","fa-info-circle",3,"matTooltip"]],template:function(i,n){i&1&&(v(),f(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),x(4),o(),h(5,P,1,1,"i",4),o(),T(6),o()()),i&2&&(m("fragmentHighlight",n.id())("id",n.id()),d(4),C(n.cardTitle()),d(),p(n.description()&&n.description().trim()!==""?5:-1))},dependencies:[D,M,a],styles:[".card[_ngcontent-%COMP%]{border:none;transition:all .3s ease-in-out}.card.fragment-highlight[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_fragmentHighlightPulse 2s ease-in-out;border:1px solid rgba(44,105,212,.4);box-shadow:0 0 20px #2c69d466}.card.fragment-highlight-fadeout[_ngcontent-%COMP%]{border:1px solid rgba(44,105,212,0);box-shadow:0 10px 10px 2px #0000001a;transition:border .5s ease-out,box-shadow .5s ease-out}.card-headers[_ngcontent-%COMP%]{border-bottom:1px solid #eaeaea;margin-bottom:20px;padding-bottom:20px}@keyframes _ngcontent-%COMP%_fragmentHighlightPulse{0%{box-shadow:0 0 10px #2c69d44d}50%{box-shadow:0 0 25px #2c69d499}to{box-shadow:0 0 20px #2c69d466}}"]})};export{I as a};
