import{composeTypographyStyle as t,getStyleShadow as e,makeStyleResponsive as l,getGlobalColorStyle as o,makeStyle as i,filterTruthyStyles as a,getResponsiveValueByScreen as n}from"@gem-sdk/core";let devices=["desktop","mobile","tablet"],getDisplayStyle=(t,e)=>{let l={};return devices.forEach(o=>{l={...l,[`--d${"desktop"===o?"":`-${o}`}`]:`${t(o)?"none":e}`}}),l},getTextStyle=({setting:n,renderMaxHeight:p})=>{let r=t(n?.typo,n?.typography),s={...e({value:n?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:n?.typo?.custom?.hasShadowText}),...l("ta",n?.textAlign),...o(n?.color),...i({tt:n?.transform}),...r,...p&&getMaxHeightStyleDefault(n)};return a(s)},getButtonStyle=({setting:e})=>{let n=t(e?.typo,e?.typography),p=()=>getDisplayStyle(t=>!!e?.hasLineClamp&&void 0!==e.hasLineClamp[t]&&!e.hasLineClamp[t],"inline-flex"),r={...l("jc",e?.textAlign),...i({tt:e?.transform}),...n,...o(e?.showMoreColor),...p()};return a(r)},getStaticCss=()=>{let t=`
   .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;
    }
  `,e=`
      .p-description-wrapper.gp-p-description-text * {
        color: inherit;
        line-height: inherit !important;
      }`;return{gpDescriptionCss:t,textDescriptionCss:e}},getMaxHeightStyleDefault=t=>{let e={desktop:"none"},o=["desktop","mobile","tablet"];return o.forEach(l=>{let o=n(t?.lineClamp,l),i=n(t?.hasLineClamp,l);i&&o?e[l]=`calc(${o} * 1lh)`:e[l]="none"}),{...l("maxh",e)}};export{getButtonStyle,getMaxHeightStyleDefault,getStaticCss,getTextStyle};
