import React from 'react';
import styles from './SendMessageWizard.module.css';
function ConfirmationStep({
selectedContacts,
createdMessage,
message,
isSubmitting,
}) {
// In a real app, you might fetch full contact details here
// For now, we'll work with just the IDs
const contactsCount = selectedContacts.length;
const messagePreview =
message.length > 100 ? `${message.substring(0, 100)}...` : message;
const getContactListText = () => {
if (contactsCount === 0) return 'No contacts selected';
if (contactsCount === 1) return '1 contact selected';
return `${contactsCount} contacts selected`;
};
return (
Ready to Send
Review your message and recipients before sending
{/* Recipients Section */}
👥
Recipients
{getContactListText()}
{contactsCount > 0 && (
Contact IDs:
{selectedContacts.map((id, index) => (
{id}
{index < selectedContacts.length - 1 && ', '}
))}
)}
{/* Message Section */}
💬
Message
{message || (
No message entered
)}
Characters:
{createdMessage.content.length}
{message.trim() ? message.trim().split(/\s+/).length : 0}
{/* Summary Section */}
📊
Summary
{contactsCount}
Recipients
{message.split('.').length - 1}
Sentences
{Math.ceil(message.length / 160)}
SMS Parts
{/* Warning/Info Section */}
⚠️
Important: Once sent, messages cannot be recalled.
Please double-check your recipients and message content.
{isSubmitting && (
)}
);
}
export default ConfirmationStep;