'use client';
import{jsxs as o,jsx as t}from"react/jsx-runtime";import{createClass as e}from"@gem-sdk/system";import s from"../../button/components/Button.js";import r from"../hooks/useCoupon.js";import{getButtonSetting as m}from"../common/helpers.js";import{getInnerBorderCornerCss as i,getButtonStyle as l,getButtonStyles as n,getInnerActiveStyles as d}from"../common/styles.js";import{getActiveClasses as p}from"../common/classes.js";let Coupon=({setting:u,builderProps:a,builderAttrs:c,style:f,styles:h,advanced:j,children:y})=>{let{backgroundColorV2:b,textColor:C}=h??{},{mode:k,changeStateILP:v,defaultLabelState:g,dataActive:x}=r(u),$=e(p(b,C)),A=i({uid:a?.uid,styles:h}),B=d(h);return o("div",{className:$,"data-active":x,"data-id":a?.uid,children:[t("style",{children:`${A}${B}`}),t(s,{builderProps:a,builderAttrs:c,advanced:j,onClick:()=>{"edit"!==k&&v()},setting:{...m({setting:u,label:g,htmlType:"button",styles:h})},style:{...l(f,h)},styles:{...n(h)},children:y})]})};export{Coupon as default};
