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