'use strict';
import { jsx } from 'react/jsx-runtime';
import { Button } from '../../../fd-component-toolbox/button/Button.js';
import { cn } from '../../../../fd-toolbox/lib/utils.js';
import { isPaymentFormValid } from './checkout-form-validation.js';
import { elements } from '../../../../fd-toolbox/constants/elements.js';
import { getCheckoutFormButtonText } from './CheckoutFormSubmit.funcs.js';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", {
  value,
  configurable: true
});
function CheckoutFormSubmit(props) {
  return /* @__PURE__ */jsx(Button, {
    className: cn("bg-fd-tertiary-900 mt-6 mr-4 block w-full", props.submitHidden && "hidden"),
    id: elements.userSettings.payButton,
    disabled: !isPaymentFormValid(props.valid, props.cardFieldValid, props.submitting, !!props.stripe),
    type: "submit",
    children: getCheckoutFormButtonText(props.price, props.submitting, props.pricingId)
  });
}
__name(CheckoutFormSubmit, "CheckoutFormSubmit");

export { CheckoutFormSubmit };
