import{a as _}from"./chunk-FAZDIGO2.js";import{a as s}from"./chunk-AT2QL3TB.js";import"./chunk-QGCGGZRX.js";import"./chunk-SFW4HL5C.js";import{b,e as V}from"./chunk-3P3SFXO4.js";import"./chunk-U4K7EF2H.js";import"./chunk-RMZHQT5Y.js";import"./chunk-6SDJS2LJ.js";import"./chunk-KANFW7M5.js";import"./chunk-NP74G46F.js";import"./chunk-LSDTG77S.js";import"./chunk-MNHXVU2U.js";import{b as c,c as y}from"./chunk-IQNQW2RS.js";import"./chunk-SNHQQ4NV.js";import"./chunk-ISH6KDS6.js";import{n as x}from"./chunk-EGT3WOY2.js";import{Y as j}from"./chunk-EX7SUYE3.js";import{x as T,y as G}from"./chunk-WEQN5LYX.js";import"./chunk-G652K2I2.js";import"./chunk-4KB2I3K5.js";import"./chunk-C37JN36V.js";import"./chunk-BWBLFRKN.js";import"./chunk-YOIEYKEI.js";import{e as R}from"./chunk-BESX7HV3.js";import"./chunk-LHFHLR5H.js";import"./chunk-OPEEWUKU.js";import"./chunk-BYO7JUDG.js";import"./chunk-W5A7VAW2.js";import"./chunk-UGQL4IPH.js";import"./chunk-4TDNJBFX.js";import"./chunk-LI2NM675.js";import"./chunk-PUPLGGA6.js";import"./chunk-TO2CSN4Q.js";import"./chunk-YADAVUVK.js";import{i as F,j as A,k as n,p as S}from"./chunk-AVXTYPYF.js";import"./chunk-HNZDUL32.js";import"./chunk-YKFX4MVT.js";import{A as l,G as p,Kb as h,Lb as v,Nd as w,Ob as I,T as u,Td as H,ic as g,jc as M,la as U,od as d,ra as f,rc as C,wa as a,yb as o}from"./chunk-HEIW4SFT.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-355EY5W5.js").then(e=>e.IdentsMainModule)},{path:"idents-form",loadChildren:()=>import("./chunk-Y4PLYQ2R.js").then(e=>e.IdentsFormModule)},{path:"idents-form/:id",loadChildren:()=>import("./chunk-Y4PLYQ2R.js").then(e=>e.IdentsFormModule)}]}])]})}}return i})();export{de as IdentsModule};
