import{makeStyleResponsive as e,getStyleShadow as t,composeBorderCss as r,composeCornerCss as o}from"@gem-sdk/core";let a=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}},n=(t,r)=>({...t,...e("ta",r?.align)}),i=e=>{var a;let{uid:n,styles:i}=e;if(!n||!i)return"";let{borderBtnV2:d,roundedBtnV2:l,boxShadowBtn:c}=i,p=c?.active?.enable!==void 0?(a=c?.active??{})?t({value:a,state:"active",styleAppliedFor:"box-shadow",isEnableShadow:!0})["--shadow"]:"none":"",b={desktop:"",tablet:"@media only screen and (max-width: 1024px) and (min-width: 768px)",mobile:"@media only screen and (max-width: 768px)"};return(e=>{let t=b[e],a=`
      .gp-coupon[data-active="true"] .${n}::before {
        ${r(d?.active,{important:!0})};
        ${o(l?.active,!0)};
        box-shadow: ${p} !important;
      }
      .gp-coupon[data-active="true"] .${n} {
        ${o(l?.active,!0)};
        box-shadow: ${p} !important;
      }
    `.trim();return t?`${t} {
${a}
}`:a})("desktop")},d=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+="}"};export{n as getButtonStyle,a as getButtonStyles,d as getInnerActiveStyles,i as getInnerBorderCornerCss};
