import{a as d}from"./chunk-LDHFJNAZ.js";import{b as n}from"./chunk-UCUXTVO2.js";import{J as l,V as u}from"./chunk-5DNM6JNX.js";import{J as g,M as a}from"./chunk-DUETASKE.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(s,o){this.routeService=s,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()}get permissions(){return this.authRefService.userPermissions}watchUser(){this.userSubscription=this.authRefService.user.subscribe({next:s=>{this.activeUser=s}})}initRoutes(s,o){return m(this,null,function*(){let r={summary:new n(t.summary),checkin:new n(t.checkin),needs:new n(t.needs),presentation:new n(t.presentation),completion:new n(t.completion),inspection:new n(t.inspection),jobsummary:new n(t.jobsummary),pricing:new n(t.pricing),negotiation:new n(t.negotiation)},h="summary";s.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(s){this.photoSrc=s,this.viewingPhoto=!0}stopViewingPhoto(){this.viewingPhoto=!1,setTimeout(()=>{this.photoSrc=void 0},500)}managePhotos(s){this.managingPhotos||(window.clearTimeout(this.managePhotosTimer),this.closingManagePhotos=!1,this.managingPhotos=!0,this.managingPhotosEntity=s)}stopManagingPhotos(){window.clearTimeout(this.managePhotosTimer),this.closingManagePhotos=!0,this.managePhotosTimer=window.setTimeout(()=>{this.managingPhotos=!1,this.closingManagePhotos=!1,this.managingPhotosEntity=void 0},200)}manageAdditionalConsiderations(s=!1){this.managingAdditionalConsiderations=!0,this.showConsiderationPrices=s}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};
