'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),Button=require("../../button/components/Button.js"),useCoupon=require("../hooks/useCoupon.js"),helpers=require("../common/helpers.js"),styles=require("../common/styles.js"),classes=require("../common/classes.js");const Coupon=({setting:e,builderProps:s,builderAttrs:t,style:r,styles:u,advanced:l,children:n})=>{let{backgroundColorV2:o,textColor:i}=u??{},{mode:a,changeStateILP:d,defaultLabelState:c,dataActive:y}=useCoupon.default(e),m=system.createClass(classes.getActiveClasses(o,i)),j=styles.getInnerBorderCornerCss({uid:s?.uid,styles:u}),p=styles.getInnerActiveStyles(u);return jsxRuntime.jsxs("div",{className:m,"data-active":y,"data-id":s?.uid,children:[jsxRuntime.jsx("style",{children:`${j}${p}`}),jsxRuntime.jsx(Button.default,{builderProps:s,builderAttrs:t,advanced:l,onClick:()=>{"edit"!==a&&d()},setting:{...helpers.getButtonSetting({setting:e,label:c,htmlType:"button",styles:u})},style:{...styles.getButtonStyle(r,u)},styles:{...styles.getButtonStyles(u)},children:n})]})};exports.default=Coupon;
