"use strict";var core=require("@gem-sdk/core");const getButtonStyles=e=>{let t=JSON.parse(JSON.stringify(e||{}));return delete t?.borderBtnV2?.normal?.borderType,delete t?.borderBtnV2?.hover?.borderType,delete t?.borderBtnV2?.active?.borderType,delete t?.boxShadowBtn?.active,{...t,enableTextStyle:!0}},getButtonStyle=(e,t)=>({...e,...core.makeStyleResponsive("ta",t?.align)}),getInnerBorderCornerCss=e=>{let{uid:t,styles:r}=e;if(!t||!r)return"";let{borderBtnV2:o,roundedBtnV2:n,boxShadowBtn:a}=r,s=e=>e?core.getStyleShadow({value:e,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none",i=a?.active?.enable!==void 0?s(a?.active??{}):"",d={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"},c=e=>{let r=d[e],a=!!r,s=`
      .gp-coupon[data-active="true"] .${t}::before {
        ${core.composeBorderCss(o?.active,{important:!0})};
        ${core.composeCornerCss(n?.active,!0)};
        box-shadow: ${i} !important;
      }
      .gp-coupon[data-active="true"] .${t} {
        ${core.composeCornerCss(n?.active,!0)};
        box-shadow: ${i} !important;
      }
    `.trim();return a?`${r} {
${s}
}`:s};return c("desktop")},getInnerActiveStyles=e=>{let t=e?.backgroundColorV2?.active,r=e?.textColor?.active;if(!t&&!r)return"";let o=`.gp-coupon[data-active="true"] button {
`;return t&&(o+=`  background-color: ${t} !important;
`),r&&(o+=`  color: ${r} !important;
`),o+="}"};exports.getButtonStyle=getButtonStyle,exports.getButtonStyles=getButtonStyles,exports.getInnerActiveStyles=getInnerActiveStyles,exports.getInnerBorderCornerCss=getInnerBorderCornerCss;
