"use strict";var core=require("@gem-sdk/core");const devices=["desktop","mobile","tablet"],getDisplayStyle=(e,t)=>{let o={};return devices.forEach(l=>{o={...o,[`--d${"desktop"===l?"":`-${l}`}`]:`${e(l)?"none":t}`}}),o},getTextStyle=({setting:e,renderMaxHeight:t})=>{let o=core.composeTypographyStyle(e?.typo,e?.typography),l={...core.getStyleShadow({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText}),...core.makeStyleResponsive("ta",e?.textAlign),...core.getGlobalColorStyle(e?.color),...core.makeStyle({tt:e?.transform}),...o,...t&&getMaxHeightStyleDefault(e)};return core.filterTruthyStyles(l)},getButtonStyle=({setting:e})=>{let t=core.composeTypographyStyle(e?.typo,e?.typography),o=()=>getDisplayStyle(t=>!!e?.hasLineClamp&&void 0!==e.hasLineClamp[t]&&!e.hasLineClamp[t],"inline-flex"),l={...core.makeStyleResponsive("jc",e?.textAlign),...core.makeStyle({tt:e?.transform}),...t,...core.getGlobalColorStyle(e?.showMoreColor),...o()};return core.filterTruthyStyles(l)},getStaticCss=()=>{let e=`
   .gp-p-description-text > :not(ol, ul, table, div, style, script) {
      display: inline !important;
    }

    .gp-p-description-text > :not(ol, ul, table, div, style, script)::after {
      content: "";
      display: block; /* đảm bảo xuống d\xf2ng tr\xean Safari/iOS */
    }
    .gp-p-description-text > table {
      box-shadow: none;
    }
  `,t=`
      .p-description-wrapper.gp-p-description-text * {
        color: inherit;
        line-height: inherit !important;
      }`;return{gpDescriptionCss:e,textDescriptionCss:t}},getMaxHeightStyleDefault=e=>{let t={desktop:"none"},o=["desktop","mobile","tablet"];return o.forEach(o=>{let l=core.getResponsiveValueByScreen(e?.lineClamp,o),r=core.getResponsiveValueByScreen(e?.hasLineClamp,o);r&&l?t[o]=`calc(${l} * 1lh)`:t[o]="none"}),{...core.makeStyleResponsive("maxh",t)}};exports.getButtonStyle=getButtonStyle,exports.getMaxHeightStyleDefault=getMaxHeightStyleDefault,exports.getStaticCss=getStaticCss,exports.getTextStyle=getTextStyle;
