import { Modal, Button } from './ui';

export default function CollectionsSuccessModal({
  isOpen,
  createdCollection,
  onViewList,
  onStay,
}) {
  if (!createdCollection) return null;

  return (
    <Modal open={isOpen} onClose={onStay} title="List created!" size="md" hideCloseButton>
      <div className="text-center">
        <div className="text-6xl mb-4" aria-hidden="true">🎉</div>
        <p className="mb-6" style={{ color: 'var(--text-secondary)' }}>
          Your list &quot;{createdCollection.name}&quot; has been created successfully.
        </p>
        <div className="space-y-3">
          <Button variant="primary" onClick={onViewList} className="w-full">
            View List
          </Button>
          <Button variant="secondary" onClick={onStay} className="w-full">
            Stay on Lists Page
          </Button>
        </div>
      </div>
    </Modal>
  );
}
