import{a as _}from"./chunk-FAZDIGO2.js";import{a as s}from"./chunk-ZWVEY5PU.js";import"./chunk-6XOXIX4J.js";import"./chunk-RCLU5AJY.js";import{b as y,e as V}from"./chunk-5H5H6C4Y.js";import"./chunk-EJFPZ3YG.js";import"./chunk-QEMINC2A.js";import"./chunk-P4KRQVGS.js";import"./chunk-HVLAIORG.js";import"./chunk-7NRTBDEV.js";import"./chunk-WTAT2E5Z.js";import"./chunk-4KB2I3K5.js";import"./chunk-4EEGS4SZ.js";import"./chunk-Y46LOK5X.js";import"./chunk-3PEMIHKH.js";import{o as x}from"./chunk-DFPET44C.js";import{ea as j}from"./chunk-3SGEAGU4.js";import{y as b,z as G}from"./chunk-AXJC5PD4.js";import"./chunk-KX2PR432.js";import{e as R}from"./chunk-PCQVD4UN.js";import"./chunk-FUKRVTQR.js";import"./chunk-HMHHBN2H.js";import"./chunk-LTTEKZWN.js";import"./chunk-JD7XHN2Y.js";import"./chunk-PNYIEM2I.js";import{b as c,c as T}from"./chunk-WAKTITOT.js";import"./chunk-DIZJ6SFW.js";import"./chunk-NGFJDF4M.js";import"./chunk-DQXXLIFV.js";import{i as F,j as A,k as n,n as S}from"./chunk-BKF2JYPP.js";import"./chunk-OFEKULYN.js";import"./chunk-T3Q3DASN.js";import"./chunk-PYC6L6XB.js";import"./chunk-BEQYW66E.js";import{$b as g,Ab as h,Bb as v,Eb as I,F as u,Fd as w,Ld as H,_ as U,ac as M,ea as f,fd as d,ic as C,ja as a,m as l,ob as o,s as p}from"./chunk-LU6Q5ONP.js";import"./chunk-5VMFMKJR.js";H();G();d();var D=(()=>{class i extends _{constructor(e,t,r,m){super(),this.helpService=e,this.identsService=t,this.router=r,this.route=m}ngOnInit(){this.helpService.setHelpUrls({help:c.Idents,example:c.ExampleIdentsNew,video:""}),setTimeout(()=>{this.navigateToFirstIdent()},100)}navigateToFirstIdent(){this.route.firstChild!=null||this.identsService.getFirstIdent().subscribe({next:t=>{t?this.router.navigate(["idents-form",t,"basic-data"],{relativeTo:this.route}):(console.error("[Idents] No products found in database. Please create first product."),this.router.navigate(["idents-form","create","basic-data"],{relativeTo:this.route}))},error:t=>{console.error("[Idents] Error fetching first ident:",t),this.router.navigate(["idents-form","create","basic-data"],{relativeTo:this.route})}})}onActivate(e){this.currentChild=e}getViewActions(){return this.currentChild&&typeof this.currentChild.getViewActions=="function"?this.currentChild.getViewActions():[]}static{this.\u0275fac=function(t){return new(t||i)(o(T),o(s),o(n),o(F))}}static{this.\u0275cmp=h({type:i,selectors:[["paw-idents"]],standalone:!1,features:[I],decls:2,vars:0,consts:[[3,"activate"]],template:function(t,r){t&1&&(g(0,"paw-main-module-view")(1,"router-outlet",0),C("activate",function(N){return r.onActivate(N)}),M()())},dependencies:[y,A],encapsulation:2})}}return i})();d();U();var E=(i,B)=>{let e=a(n);return a(s).getFirstIdent().pipe(p(r=>(r?e.navigate(["/idents/idents-form",r,"basic-data"],{replaceUrl:!0}):e.navigate(["/idents/idents-form/create/basic-data"],{replaceUrl:!0}),!1)),u(()=>(e.navigate(["/idents/idents-form/create/basic-data"],{replaceUrl:!0}),l(!1))))};d();var de=(()=>{class i{static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275mod=v({type:i})}static{this.\u0275inj=f({imports:[w,b,V,x,j,R,S.forChild([{path:"",component:D,children:[{path:"",canActivate:[E],children:[]},{path:"idents-main",loadChildren:()=>import("./chunk-LJ7A56FH.js").then(e=>e.IdentsMainModule)},{path:"idents-form",loadChildren:()=>import("./chunk-W2Y4P2WY.js").then(e=>e.IdentsFormModule)},{path:"idents-form/:id",loadChildren:()=>import("./chunk-W2Y4P2WY.js").then(e=>e.IdentsFormModule)}]}])]})}}return i})();export{de as IdentsModule};
