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