import{D as _,d as e,e as r,v as u,w as d}from"./chunk-VYUKN3XQ.js";var v="favorite-products",E=function(t){return t.home_page="HOME_PAGE",t.category_page="CATEGORY_PAGE",t.product_page="PRODUCT_PAGE",t.favorites_page="FAVORITES_PAGE",t.favorites_picker="FAVORITES_PICKER",t.add_extra="ADD_EXTRA",t.cart="CART",t}(E||{}),R={hasX:!0,message:"Produsul a fost ad\u0103ugat la lista de favorite",class:"mat-snack-bar-favorites-yellow"},p={hasX:!0,message:"Ne pare r\u0103u, momentan salvarea produselor tale favorite nu este disponibil\u0103. Te rug\u0103m s\u0103 \xEEncerci mai t\xE2rziu.",class:"mat-snack-bar-favorites-yellow"},l={hasX:!0,message:"Produsul a fost \xEEnl\u0103turat din lista produselor favorite",class:"mat-snack-bar-favorites-yellow"},F={hasX:!0,message:"Ne pare r\u0103u, \u0219tergerea produselor din lista ta de favorite nu s-a putut efectua. Te rug\u0103m s\u0103 \xEEncerci mai t\xE2rziu.",class:"mat-snack-bar-favorites-yellow"},m={hasX:!0,message:"",class:"mat-snack-bar-favorites-yellow"};var n=e("[ADD_PRODUCT_FAVORITES] Add product to favorite list",r()),f=e("[ADD_PRODUCT_FAVORITES_SUCCESS] Add product to favorite list success",r()),P=e("[ADD_PRODUCT_FAVORITES_ERROR] Add product to favorite list error",r()),S=e("[REMOVE_PRODUCT_FAVORITES] Removed product from favorite list",r()),O=e("[REMOVE_PRODUCT_FAVORITES_SUCCESS] Removed product from favorite list success",r()),D=e("[REMOVE_PRODUCT_FAVORITES_ERROR] Removed product from favorite list error",r()),A=e("[SET_INITIAL_STATUS_PRODUCT_FAVORITES] Set initial status on favorite, will be reloaded"),a=e("[GET_PRODUCT_FAVORITES] Get products from favorite list"),g=e("[GET_PRODUCT_FAVORITES_SUCCESS] Get products from favorite list success",r()),x=e("[GET_PRODUCT_FAVORITES_ERROR] Get products from favorite list error",r()),C=e("[DISPLAY_DISPLAY_FAVORITES_NOTIFICATION] Display favorite notifications, can be success, error or other",r()),U=e("[SET_FAVORITE_PRODUCTS_IDS_WITH_SESSION_MERGE] Set initial status on Favorite Products Ids With Session Merge, will be reloaded"),V=e("[GET_FAVORITE_PRODUCTS_IDS_WITH_SESSION_MERGE_SUCCESS] Get Favorite Products Ids With Session Merge success",r()),M=e("[ADD_FAVORITE_PRODUCTS_IDS_WITH_SESSION_MERGE_ID] Add to Favorite Products Ids With Session Merge",r()),G=e("[REMOVE_FAVORITE_PRODUCTS_IDS_WITH_SESSION_MERGE_ID] Remove from Favorite Products Ids With Session Merge list",r());var o=d("favorites"),y=()=>({selector:o,action:()=>a(),shouldDispatch(t){return t.favorites_page.status===_.initial},map(t){return t.favorites_page}}),w=()=>({selector:o,action:()=>n,map(t){return t.add_to_favorites}}),X=t=>u(o,s=>!!s.favorites_ids_session.response[t]),k=()=>({selector:o,action:()=>S,map(t){return t.remove_from_favorite}}),H=t=>({selector:o,action:()=>a(),map(s){var i,c;return t?((c=(i=s.remove_from_favorite)==null?void 0:i.action_data)==null?void 0:c.id)===t:!1}});export{n as a,f as b,P as c,S as d,O as e,D as f,A as g,a as h,g as i,x as j,C as k,U as l,V as m,M as n,G as o,v as p,E as q,R as r,p as s,l as t,F as u,m as v,y as w,w as x,X as y,k as z,H as A};