import{I,K as f,M as r,O as i,P as S,g as u}from"./chunk-GHYBLXL4.js";import{$c as l,Ab as m,ja as c,pa as h,s as p}from"./chunk-ZSMGRWAG.js";import{a as s,b as a}from"./chunk-GAL4ENT6.js";var g=(()=>{class o{#t=h(u);#o=h(S);#e=h(I);#s=i([this.#o.baseUrl(),f.WB]);markPostBoxAsRead(t){let e=i([this.#s,r.MARK_POST_BOX_AS_READ]);return this.#t.post(e,s(s({},t),this.#e.getSiteInformation()))}postCorrespondence(t){let e=i([this.#s,r.POST_CORRESPONDENCE]);return this.#t.post(e,s(s({},t),this.#e.getSiteInformation()))}generateTemporaryInformationLocker(t){let e=i([this.#s,r.GENERATE_TEMPORARY_INFORMATION_LOCKER]);return this.#t.post(e,s(s({},t),this.#e.getSiteInformation()))}validateLogin(t){let e=i([this.#s,r.VALIDATE_LOGIN]);return this.#t.post(e,s(s({},t),this.#e.getSiteInformation()))}getPostboxes(t){let e=i([this.#s,r.GET_POSTBOXES]);return this.#t.post(e,s(s({},t),this.#e.getSiteInformation())).pipe(p(n=>this.castDatesToUTCIso(n)))}validateOneTimePassword(t){let e=i([this.#s,r.VALIDATE_ONE_TIME_PASSWORD]);return this.#t.post(e,s(s({},t),this.#e.getSiteInformation()))}changeOneTimePassword(t){let e=i([this.#s,r.CHANGE_ONE_TIME_PASSWORD]);return this.#t.post(e,s(s({},t),this.#e.getSiteInformation()))}castDatesToUTCIso(t){return a(s({},t),{Issues:t.Issues.map(e=>a(s({},e),{IssueComments:e.IssueComments.map(n=>a(s({},n),{CreatedDate:new Date(n.CreatedDate+" UTC").toISOString()}))}))})}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var N=(()=>{class o{constructor(){this.#t=m(null),this.#o=m(null),this.postBox=this.#t.asReadonly(),this.informationLocker=l(()=>this.#t().InformationLocker),this.sessionToken=this.#o.asReadonly()}#t;#o;setSessionToken(t){this.#o.set(t)}setPostBox(t){this.#t.set(t)}clearPostBox(){this.#t.set(null)}static{this.\u0275fac=function(e){return new(e||o)}}static{this.\u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();export{g as a,N as b};
