import{useMemo as t}from"react";import{postPurchaseSpacing as e}from"../../common/helper.js";let r=r=>{let{imageList:n,setting:o}=r,{layoutType:l="bottom-center",spacingVertical:m,spacingHoz:c,ratioLayoutLeft:i,ratioLayoutRight:f,displayType:u}=o||{},g=t(()=>n.length>1,[n.length]),s=t(()=>"bottom-center"===l?e[m||"none"]:c,[l,c,m]),a=t(()=>{let t={"--gtc":"minmax(0, 12fr)"};if(!g)return t;let e="left"===l?i:f,r=["left","right"].includes(l);return r&&e?{"--gtc":`minmax(0, ${e[0]}fr) minmax(0, ${e[1]}fr)`,"--gtr":"fit-content(0)"}:t},[g,l,i,f]),h=t(()=>!["two-col","one-col"].includes(l)&&(["left","right"].includes(l)||"slider"===u),[l,u]);return{itemGap:s,gridLayout:a,isShowGalleryImages:g,isImageListCarousel:h}};export{r as useProductImagePostPurchase};
