| 
									
										
										
										
											2023-01-03 11:55:46 -08:00
										 |  |  | // Copyright 2020 Signal Messenger, LLC
 | 
					
						
							| 
									
										
										
										
											2022-12-05 14:46:54 -08:00
										 |  |  | // SPDX-License-Identifier: AGPL-3.0-only
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import * as React from 'react'; | 
					
						
							| 
									
										
										
										
											2023-10-11 12:06:43 -07:00
										 |  |  | import type { Meta } from '@storybook/react'; | 
					
						
							| 
									
										
										
										
											2022-12-05 14:46:54 -08:00
										 |  |  | import type { PropsType } from './ConversationMergeNotification'; | 
					
						
							|  |  |  | import { ConversationMergeNotification } from './ConversationMergeNotification'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-03-13 12:52:08 -07:00
										 |  |  | const { i18n } = window.SignalContext; | 
					
						
							| 
									
										
										
										
											2022-12-05 14:46:54 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | export default { | 
					
						
							|  |  |  |   title: 'Components/Conversation/ConversationMergeNotification', | 
					
						
							| 
									
										
										
										
											2023-10-11 12:06:43 -07:00
										 |  |  | } satisfies Meta<PropsType>; | 
					
						
							| 
									
										
										
										
											2022-12-05 14:46:54 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | const createProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({ | 
					
						
							|  |  |  |   i18n, | 
					
						
							|  |  |  |   conversationTitle: overrideProps.conversationTitle || 'John Fire', | 
					
						
							| 
									
										
										
										
											2023-01-12 14:18:08 -08:00
										 |  |  |   obsoleteConversationNumber: | 
					
						
							|  |  |  |     overrideProps.obsoleteConversationNumber || '(555) 333-1111', | 
					
						
							| 
									
										
										
										
											2022-12-05 14:46:54 -08:00
										 |  |  |   obsoleteConversationTitle: | 
					
						
							| 
									
										
										
										
											2023-01-12 14:18:08 -08:00
										 |  |  |     overrideProps.obsoleteConversationTitle || 'John Obsolete', | 
					
						
							| 
									
										
										
										
											2022-12-05 14:46:54 -08:00
										 |  |  | }); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export function Basic(): JSX.Element { | 
					
						
							|  |  |  |   return <ConversationMergeNotification {...createProps()} />; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-12 14:18:08 -08:00
										 |  |  | export function WithNoObsoleteNumber(): JSX.Element { | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <ConversationMergeNotification | 
					
						
							|  |  |  |       {...createProps()} | 
					
						
							|  |  |  |       obsoleteConversationNumber={undefined} | 
					
						
							|  |  |  |     /> | 
					
						
							|  |  |  |   ); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-05 14:46:54 -08:00
										 |  |  | export function WithNoObsoleteTitle(): JSX.Element { | 
					
						
							|  |  |  |   return ( | 
					
						
							|  |  |  |     <ConversationMergeNotification | 
					
						
							|  |  |  |       {...createProps()} | 
					
						
							|  |  |  |       obsoleteConversationTitle={undefined} | 
					
						
							|  |  |  |     /> | 
					
						
							|  |  |  |   ); | 
					
						
							|  |  |  | } |