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