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