import{a as _}from"./chunk-FAZDIGO2.js";import{a as s}from"./chunk-IETI2FBS.js";import"./chunk-Q5SNJJMP.js";import"./chunk-CVN2SFTO.js";import{b,e as V}from"./chunk-EF7JHLYY.js";import"./chunk-YMCWBAFL.js";import"./chunk-6RHZCQIS.js";import"./chunk-YSNVJGXI.js";import"./chunk-KTIENLBV.js";import"./chunk-77EBS4NN.js";import"./chunk-ALSZTHVZ.js";import{b as c,c as y}from"./chunk-CCEFLJAX.js";import"./chunk-JZSUDXWG.js";import"./chunk-LWIODCLS.js";import{n as x}from"./chunk-DQXFRGXZ.js";import{W as j}from"./chunk-HQWCEBNO.js";import{x as T,y as G}from"./chunk-PZHJ5CIW.js";import"./chunk-UODKNILH.js";import"./chunk-4KB2I3K5.js";import"./chunk-42X3ZN6C.js";import"./chunk-GGHU4LSQ.js";import"./chunk-4XWQVNIT.js";import{e as R}from"./chunk-L4AHOKXJ.js";import"./chunk-TI456YDF.js";import"./chunk-CYCG24O3.js";import"./chunk-CPKBOKTQ.js";import"./chunk-H2CU6EEU.js";import"./chunk-GK2ZGAUD.js";import"./chunk-4TDNJBFX.js";import"./chunk-NUAVJ2U7.js";import"./chunk-XQ5HIU5J.js";import"./chunk-QRO4DHCL.js";import"./chunk-ANX7B7LC.js";import{i as F,j as A,k as n,p as S}from"./chunk-QVLAHW2O.js";import"./chunk-TI6NUUOB.js";import"./chunk-B46M6TSS.js";import{A as l,G as p,Kb as h,Lb as v,Md as w,Ob as I,Sd as H,T as u,hc as g,ic as M,la as U,nd as d,qc as C,ra as f,wa as a,yb as o}from"./chunk-PGS4AHIT.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(y),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:[b,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,T,V,x,j,R,S.forChild([{path:"",component:D,children:[{path:"",canActivate:[E],children:[]},{path:"idents-main",loadChildren:()=>import("./chunk-UGJB33NA.js").then(e=>e.IdentsMainModule)},{path:"idents-form",loadChildren:()=>import("./chunk-POCVPOA6.js").then(e=>e.IdentsFormModule)},{path:"idents-form/:id",loadChildren:()=>import("./chunk-POCVPOA6.js").then(e=>e.IdentsFormModule)}]}])]})}}return i})();export{de as IdentsModule};
