import{a as d}from"./chunk-Q6J422OC.js";import{b as s}from"./chunk-AAJI5YGX.js";import{e as l,l as u}from"./chunk-WDKU2DTK.js";import{A as a,y as g}from"./chunk-4BILO7NM.js";import{f as m}from"./chunk-4IDNTCH7.js";var t=(function(i){return i.diagram="diagram",i.summary="summary",i.checkin="checkin",i.presentation="presentation",i.needs="needs",i.completion="completion",i.inspection="inspection",i.jobsummary="jobsummary",i.pricing="pricing",i.negotiation="negotiation",i})(t||{});var j=(()=>{let e=class e{constructor(n,o){this.routeService=n,this.authRefService=o,this.activeUser=null,this.viewingPhoto=!1,this.managingPhotos=!1,this.closingManagePhotos=!1,this.managingAdditionalConsiderations=!1,this.showConsiderationPrices=!1,this.showQuoteControl=!1,this.watchUser()}watchUser(){this.userSubscription=this.authRefService.user.subscribe({next:n=>{this.activeUser=n}})}initRoutes(n,o){return m(this,null,function*(){let r={summary:new s(t.summary),checkin:new s(t.checkin),needs:new s(t.needs),presentation:new s(t.presentation),completion:new s(t.completion),inspection:new s(t.inspection),jobsummary:new s(t.jobsummary),pricing:new s(t.pricing),negotiation:new s(t.negotiation)},h="summary";n.status==l.PendingSubmission&&(h="completion");let c=t[h];c!=null?this.routeService.init(r,c,250,o):this.routeService.init(r,t.summary,250,o)})}viewPhoto(n){this.photoSrc=n,this.viewingPhoto=!0}stopViewingPhoto(){this.viewingPhoto=!1,setTimeout(()=>{this.photoSrc=void 0},500)}managePhotos(n){this.managingPhotos||(window.clearTimeout(this.managePhotosTimer),this.closingManagePhotos=!1,this.managingPhotos=!0,this.managingPhotosEntity=n)}stopManagingPhotos(){window.clearTimeout(this.managePhotosTimer),this.closingManagePhotos=!0,this.managePhotosTimer=window.setTimeout(()=>{this.managingPhotos=!1,this.closingManagePhotos=!1,this.managingPhotosEntity=void 0},200)}manageAdditionalConsiderations(n=!1){this.managingAdditionalConsiderations=!0,this.showConsiderationPrices=n}stopManagingAdditionalConsiderations(){this.managingAdditionalConsiderations=!1}ngOnDestroy(){this.userSubscription?.unsubscribe()}};e.\u0275fac=function(o){return new(o||e)(a(d),a(u))},e.\u0275prov=g({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();export{t as a,j as b};
