try{let a="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new a.Error).stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="754b969b-cc3f-47ca-99a0-8bf84f4902d8",a._sentryDebugIdIdentifier="sentry-dbid-754b969b-cc3f-47ca-99a0-8bf84f4902d8")}catch(p){}import{_ as a,W as e,U as t,b as s}from"./index.3a1c246f.js";import{a4 as o,D as r,i as n,V as d,$ as l,P as u,o as i,E as f,a as c,w as h,F as v,ai as b,Q as w}from"./vendor.82ce4f28.js";const y={name:"CanFavorite",components:{AuthOverlay:o((()=>a((()=>import("./AuthOverlay.550e4450.js")),["assets/AuthOverlay.550e4450.js","assets/AuthOverlay.73c0e5f9.css","assets/vendor.82ce4f28.js","assets/FlexWrapper.4286d68a.js","assets/FlexWrapper.16533c64.css","assets/google.9dfe6171.js","assets/index.3a1c246f.js","assets/index.4af69877.css","assets/AuthNavigation.f01375e3.js","assets/FormError.70d8fb55.js","assets/useDiscount.daf48909.js","assets/DeviceUtils.c408cefe.js"]))),FavoriteSnackbar:o((()=>a((()=>import("./FavoriteSnackbar.c4e50456.js")),["assets/FavoriteSnackbar.c4e50456.js","assets/FavoriteSnackbar.43795448.css","assets/index.3a1c246f.js","assets/index.4af69877.css","assets/vendor.82ce4f28.js","assets/Snackbar.224de879.js"])))},setup(){const a=r({show:!1,domRef:null}),s=n(!1),{state:o,targetDomEl:u,showSnackbar:i,addFavoriteItem:f,removeFavoriteItem:c,updateFavoriteProduct:h}=e();return d((()=>{window.setTimeout((()=>{s.value=!0}),2e3)})),l((()=>a.show),((a,e)=>{a&&(s.value=!0),a===e||a||(t.isRegistered()?(t.refreshUser(),f()):c(),h(null))})),l((()=>o.favProduct),(()=>{!t.isRegistered()&&o.favProduct&&(a.domRef=u.value,a.show=!0)})),{showSnackbar:i,authOverlay:a,favoriteState:o,authLoaded:s}}},_={key:0,class:"can-favorite"};var m=s(y,[["render",function(a,e,t,s,o,r){const n=u("AuthOverlay"),d=u("FavoriteSnackbar");return s.authLoaded?(i(),f("div",_,[(i(),c(b,null,{default:h((()=>[v(n,{show:s.authOverlay.show,"onUpdate:show":e[0]||(e[0]=a=>s.authOverlay.show=a),data:s.authOverlay},null,8,["show","data"])])),_:1})),(i(),c(b,null,{default:h((()=>[v(d,{show:s.showSnackbar},null,8,["show"])])),_:1}))])):w("",!0)}]]);export{m as default}; //# sourceMappingURL=CanFavorite.68f1376d.js.map