import React from 'react';
import {
  CreateCardForTemporaryUseForm,
  type CreateCardForTemporaryUseFormProps,
} from './CreateCardForTemporaryUseForm';

type SaveCardFormProps = Pick<
  CreateCardForTemporaryUseFormProps<true>,
  | 'data'
  | 'onChange'
  | 'styles'
  | 'onValidateSuccess'
  | 'onValidateFailure'
  | 'customStrings'
>;

export const SaveCardForm: React.FC<SaveCardFormProps> = ({
  data,
  onChange,
  onValidateSuccess,
  onValidateFailure,
  styles,
  customStrings,
}) => (
  <CreateCardForTemporaryUseForm
    hideCVC
    styles={styles}
    data={data}
    onChange={onChange}
    onValidateSuccess={onValidateSuccess}
    onValidateFailure={onValidateFailure}
    customStrings={customStrings}
  />
);
