1import{La as zf,Mt as O,Wt as Qf,kr as gc,ta as v,tn as S0}from"./chunk-DJGKVMLX.js";import{i as et}from"./chunk-DI0obt6U.js";import{r as v$1,t as g$1}from"./chunk-C8HDgcwp.js";import{b as z,c as Rn,n as An,o as Nn}from"./chunk-DPp0pvIR.js";import{d as dt$1,f as h,m as s,n as G,o as S,u as _$1}from"./chunk-DzUV5nXW.js";import{n as l}from"./chunk-DuUtpjAd.js";import{s as d}from"./chunk-dkUA_lNv.js";function y(r,e,t){let s=_$1(r,t?.in);return isNaN(e)?G(t?.in||r,NaN):(e&&s.setDate(s.getDate()+e),s)}function $(r,e,t){return y(r,e*7,t)}var g=(()=>{class r{static{this.type=`[Reservations] Update`}constructor(t,s){this.reservationId=t,this.updateReservationRequestModel=s}}return r})();var _=(()=>{class r{static{this.type=`[Reservations] Create`}constructor(t){this.createReservationRequestModel=t}}return r})();var w=(()=>{class r{static{this.type=`[Reservations] Delete`}constructor(t){this.reservationId=t}}return r})();var o=(()=>{class r{static{this.type=`[Reservations] SetIsLoading`}constructor(t){this.isLoading=t}}return r})();var i=class I{constructor(){this.reservationsService=v(et),this.toastService=v(v$1),this.store=v(z),this.sharedState=v(s)}static getIsLoading(e){return e.isLoading}createReservation(e,t){return this.store.dispatch(new o(!0)),this.reservationsService.apiReservationsPost({body:t.createReservationRequestModel}).pipe(Qf(()=>{this.store.dispatch(new d),this.toastService.show({severity:g$1.Success,detail:`${l.TRANSLATIONS.reservation} ${l.TRANSLATIONS.created}.`}),this.store.dispatch(new S(h.RESERVATION_FORM_NAME))}),gc(s=>this.sharedState.catchAndPatchError(s,h.RESERVATION_FORM_NAME)),zf(()=>{this.store.dispatch(new o(!1))}))}updateReservation(e,t){return this.store.dispatch(new o(!0)),this.reservationsService.apiReservationsIdPut({id:t.reservationId,body:t.updateReservationRequestModel}).pipe(Qf(()=>{this.store.dispatch(new d),this.toastService.show({severity:g$1.Success,detail:`${l.TRANSLATIONS.reservation} ${l.TRANSLATIONS.edited}.`}),this.store.dispatch(new S(h.RESERVATION_FORM_NAME))}),gc(s=>this.sharedState.catchAndPatchError(s,h.RESERVATION_FORM_NAME)),zf(()=>{this.store.dispatch(new o(!1))}))}deleteReservation(e,t){return this.store.dispatch(new o(!0)),this.reservationsService.apiReservationsIdDelete({id:t.reservationId}).pipe(Qf(()=>{this.store.dispatch(new d),this.toastService.show({severity:g$1.Success,detail:`${l.TRANSLATIONS.reservation} ${l.TRANSLATIONS.deleted}.`}),this.store.dispatch(new S(h.RESERVATION_DELETE_FORM_NAME))}),gc(s=>this.sharedState.catchAndPatchError(s,h.RESERVATION_DELETE_FORM_NAME)),zf(()=>{this.store.dispatch(new o(!1))}))}setIsLoading(e,t){e.patchState({isLoading:t.isLoading})}static{this.ɵfac=function(t){return new(t||I)}}static{this.ɵprov=O({token:I,factory:I.ɵfac})}};S0([An(_)],i.prototype,`createReservation`,null);S0([An(g)],i.prototype,`updateReservation`,null);S0([An(w)],i.prototype,`deleteReservation`,null);S0([An(o)],i.prototype,`setIsLoading`,null);S0([Rn([i])],i,`getIsLoading`,null);i=S0([Nn({name:`reservations`,defaults:{isLoading:!1}})],i);function D(r,e,t){return G(t?.in||r,+_$1(r)+e)}function at(r,e,t){return D(r,e*dt$1,t)}function dt(r,e,t){let s=_$1(r,t?.in);return s.setMinutes(e),s}function ht(r,...e){let t=G.bind(null,r||e.find(s=>typeof s==`object`));return e.map(t)}function Rt(r){return e=>{let s=(r?Math[r]:Math.trunc)(e);return s===0?0:s}}export{at as a,ht as c,y as d,_ as i,i as l,D as n,dt as o,Rt as r,g as s,$ as t,w as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.