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