import{a as d}from"./chunk-TC5FJUMX.js";import{b as s}from"./chunk-XQWKYEMC.js";import{I as l,U as u}from"./chunk-F5MSX4O5.js";import{J as g,M as a}from"./chunk-VEXJN5D7.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};
