import{a as l,b as k}from"./chunk-SM7EQ7ST.js";import{a as h,b as j}from"./chunk-6B6CBPYV.js";import{Sa as f,Xa as b,be as S,d as i,g as n,h as d,i as m,ka as c,na as p,ta as u}from"./chunk-WL5U2YIT.js";import{e as I}from"./chunk-ADEKKGI2.js";function q(a){return new i(e=>{let r=new FileReader;return r.readAsDataURL(a),r.onload=()=>{e.next(r.result),e.complete()},r.onerror=()=>e.error(r.error),()=>r.abort()})}var y,L=I(()=>{p();f();j();k();S();y=(()=>{let e=class e extends l{constructor(){super(...arguments),this.deletedImageSubject=new m,this.handbookImagesListSubject=new d([]),this.editRequest$=new n}get deletedImage$(){return this.deletedImageSubject.asObservable()}get handbookImagesList$(){return this.handbookImagesListSubject.asObservable()}get handbookImagesList(){return this.handbookImagesListSubject.getValue()}set handbookImagesList(t){this.handbookImagesListSubject.next(t)}deleteImage$(t){return this.deleteImageRequest$(t).pipe(c(({errorMessage:s,result:o})=>{o===h.Success?(this.deletedImageSubject.next({imageId:t}),this.handbookImagesList=this.handbookImagesList.filter(g=>g.id!==t)):console.log(s,o)}))}editImageRequest(t){this.editRequest$.next(t)}};e.\u0275fac=(()=>{let t;return function(o){return(t||(t=b(e)))(o||e)}})(),e.\u0275prov=u({token:e,factory:e.\u0275fac,providedIn:"root"});let a=e;return a})()});export{y as a,q as b,L as c};
