import { Spinner } from '@woocommerce/components';
import { Flex, Modal } from '@wordpress/components';
import { __ } from '@wordpress/i18n';

interface PrepayProcessingProps {
  onRequestClose: () => void;
}

export function PrepayProcessing({ onRequestClose }: PrepayProcessingProps) {
  return (
    <Modal
      size="medium"
      title={__('Processing Prepay payment', 'parcel2go-shipping')}
      isDismissible={false}
      shouldCloseOnClickOutside={false}
      onRequestClose={onRequestClose}
    >
      <Flex direction="column" align="center" justify="center" gap={4} style={{ minHeight: 160, padding: 24 }}>
        <Spinner />
        <p style={{ margin: 0, color: '#757575', fontSize: 14 }}>
          {__('Please wait while we process your PrePay payment...', 'parcel2go-shipping')}
        </p>
      </Flex>
    </Modal>
  );
}