import{isTransparentColor as e}from"../../helpers.js";import{getOverlayOpacity as t}from"./helpers.js";function composeClasses(e){return e.split(" ").reduce((e,t)=>(e[t]=!0,e),{})}let getContainClasses=(e,s,o)=>{let g="gp-dialog gp-bg-transparent gp-z-[999999]";return"0%"!=t(s)&&o&&"transparent"!=o||(g+=" backdrop:!gp-bg-transparent"),e&&(g+=` ${e}`),{...composeClasses(g)}},getBackdropClasses=e=>{let t="gp-fixed gp-inset-0 gp-z-50 gp-flex gp-overflow-y-auto gp-overflow-x-hidden gp-shadow-xl";return"center"===e&&(t+=" gp-items-center gp-justify-center"),"top"===e&&(t+=" gp-justify-center gp-items-start"),"top-right"===e&&(t+=" gp-justify-end gp-items-start"),"top-left"===e&&(t+=" gp-justify-start gp-items-start"),"bottom"===e&&(t+=" gp-items-end gp-justify-center"),"left"===e&&(t+=" gp-items-center gp-justify-start"),"right"===e&&(t+=" gp-items-center gp-justify-end"),"bottom-left"===e&&(t+=" gp-items-end gp-justify-start"),"bottom-right"===e&&(t+=" gp-items-end gp-justify-end"),{...composeClasses(t)}},getOverlayClasses=()=>({...composeClasses("gp-fixed gp-inset-0 gp-block gp-transition-all gp-duration-100")}),getDialogContentClasses=({setting:t,enableEffect:s,isILP:o})=>{let{effectType:g,background:n,closeButtonPosition:p}=t??{},a="gp-relative gp-max-h-full gp-max-w-full";return"fade"===g&&s&&(a+=" gp-animate-[fadeIn_0.4s_ease-in]"),"zoom"===g&&s&&(a+=" gp-animate-[zoomIn_0.3s_ease-in]"),"zoom-out"===g&&s&&(a+=" gp-animate-[zoomOut_0.3s_ease-in]"),"horizontal"===g&&s&&(a+=" gp-animate-[slideInLeft_0.3s_ease-in]"),"vertical"===g&&s&&(a+=" gp-animate-[slideInUp_0.3s_ease-in]"),"unfold"===g&&s&&(a+=" gp-animate-[unfold_0.3s_ease-in-out]"),"outside"!==p&&(a+=" gp-overflow-hidden"),e(n?.desktop?.color)||(a+=" gp-shadow-xl"),!s&&o&&(a+=" gp-animate-[fadeOut_0.2s_ease-out]"),{...composeClasses(a)}},getHeadContentClasses=()=>({...composeClasses("gp-inline-block gp-h-screen gp-align-middle")}),getButtonContentClasses=e=>{let t="gp-absolute gp-top-0 gp-right-0 gp-inline-flex gp-items-center gp-justify-center gp-outline-none focus-visible:gp-shadow-none focus-visible:gp-outline-none gp-overflow-hidden gp-z-1";return"outside"===e&&(t+=" gp-translate-x-1/2 -gp-translate-y-1/2 gp-shadow-md gp-z-[999999]"),{...composeClasses(t)}},getSvgContentClasses=()=>({...composeClasses("[&>svg]:!gp-w-auto [&>svg]:!gp-h-[var(--height-icon)]")}),getBodyContentClasses=()=>({...composeClasses("gp-h-full gp-w-full gp-overflow-y-auto gp-overflow-x-hidden !gp-max-h-screen")});export{getBackdropClasses,getBodyContentClasses,getButtonContentClasses,getContainClasses,getDialogContentClasses,getHeadContentClasses,getOverlayClasses,getSvgContentClasses};
