"use strict";var core=require("@gem-sdk/core"),React=require("react");const useFeatureImagePostPurchase=e=>{let{gallery:r}=e,t=core.useCurrentVariant(),u=core.useFeaturedImageGlobal(),a=core.useProductStore(e=>e.setProductFeaturedImage),s=React.useMemo(()=>{if(!u)return 0;let e=r.findIndex(e=>e.id===u.id);return -1!==e?e:0},[u,r]);return React.useEffect(()=>{t?.media&&"IMAGE"===t.media.contentType&&a(t.media)},[t,a]),{idxActive:s}};exports.useFeatureImagePostPurchase=useFeatureImagePostPurchase;
