import{n as c,o as C,p as x}from"./chunk-OWZ5YAMH.js";import{k as o,la as i}from"./chunk-ISMRT7VU.js";import{a as b,b as p}from"./chunk-M5TX2NVG.js";var y=(()=>{class s{static{this.type="[Employee] Set Employee"}constructor(t){this.employee=t}}return s})(),m=(()=>{class s{static{this.type="[Employee] Update Employee"}constructor(t){this.employee=t}}return s})(),g=(()=>{class s{static{this.type="[Employee] Reset Employee"}}return s})();var n=(()=>{class s{static{this.type="[Cashboxes] Set Cashboxes"}constructor(t){this.cashboxes=t}}return s})(),S=(()=>{class s{static{this.type="[Cashboxes] Set Cashbox"}constructor(t){this.cashbox=t}}return s})(),d=(()=>{class s{static{this.type="[Cashboxes] Update Cashbox Settings"}constructor(t,l){this.cashboxId=t,this.settings=l}}return s})(),u=(()=>{class s{static{this.type="[Cashboxes] Clear Cashboxes"}}return s})();var a=class h{static cashboxes(e){return e.cashboxes}static selectedCashbox(e){return e.selectedCashboxes}setCashboxes(e,t){e.setState({cashboxes:t.cashboxes,selectedCashboxes:e.getState().selectedCashboxes})}setSelectedCashbox(e,t){e.setState({selectedCashboxes:t.cashbox,cashboxes:e.getState().cashboxes})}updateCashboxSettings(e,t){let l=e.getState().cashboxes.map(r=>r.id===t.cashboxId?p(b({},r),{settings:t.settings}):r);e.patchState({cashboxes:l})}clearCashboxes(e){e.setState({cashboxes:[],selectedCashboxes:null})}static{this.\u0275fac=function(t){return new(t||h)}}static{this.\u0275prov=i({token:h,factory:h.\u0275fac})}};o([c(n)],a.prototype,"setCashboxes",null);o([c(S)],a.prototype,"setSelectedCashbox",null);o([c(d)],a.prototype,"updateCashboxSettings",null);o([c(u)],a.prototype,"clearCashboxes",null);o([x()],a,"cashboxes",null);o([x()],a,"selectedCashbox",null);a=o([C({name:"cashboxes",defaults:{cashboxes:[],selectedCashboxes:null}})],a);export{y as a,m as b,g as c,n as d,d as e,a as f};
//# sourceMappingURL=chunk-ZQPWXQD7.js.map
