"use strict";var core=require("@gem-sdk/core");const getClasses=({setting:e,advanced:t,builderProps:s})=>({...s?.uid&&{[s.uid]:!0},...e?.options?.customClass?.wrapper&&{[e.options.customClass.wrapper]:!0},...t?.cssClass&&{[t.cssClass]:!0}}),getContainerClasses=({setting:e})=>{let{excludeFlex:t}=e??{},s="";return t||(s+=" gp-flex"),composeClasses(s)},getTextClasses=({styles:e,setting:t,className:s,isEdit:o,disableEdit:r})=>{let{text:l,options:a}=t??{},p="";if(l||r||(p+="gp-relative empty:gp-pl-[2px] after:gp-content-['Your_custom_text_goes_here'] after:gp-absolute after:gp-select-none after:gp-top-0 after:gp-left-[2px] after:gp-w-full after:gp-truncate after:gp-text-black after:gp-opacity-20 "),e?.enableHoverEffect&&e?.underlineLink){let{underlineLink:t}=e,s=t.hover?"hover:gp-underline":"hover:!gp-no-underline",o=t.normal?"gp-underline":"";p+=` ${s} ${o}`.trim()}o?(p+="     gp-text gp-cursor-pointer !gp-cursor-default",r||(p+=" gp-p-[2px]"),a?.useState&&(p+=" child-item-text gp-border gp-border-transparent hover:!gp-border-[#3C67FF]")):(p+=" gp-text-instant",a?.disablePointerEvent&&(p+=" gp-pointer-events-none"));let n=p.trim().split(" ").reduce((e,t)=>(e[t]=!0,e),{});return{...s&&{[s]:!0},...globalTypoClasses(e),...n}};function composeClasses(e){return e.split(" ").reduce((e,t)=>(e[t]=!0,e),{})}const globalTypoClasses=e=>{let t=core.composeTypographyClassName(e?.typo);return{...t&&{[t]:!0},...e?.textColor&&{[core.getGlobalColorClass("text",e?.textColor)]:!0},...!e?.textColor&&{[core.getGlobalColorStateClass("text",e?.color)]:!0}}};exports.composeClasses=composeClasses,exports.getClasses=getClasses,exports.getContainerClasses=getContainerClasses,exports.getTextClasses=getTextClasses,exports.globalTypoClasses=globalTypoClasses;
