| 
									
										
										
										
											2024-09-10 15:23:16 +08:00
										 |  |  | import { memo } from 'react' | 
					
						
							|  |  |  | import { useTranslation } from 'react-i18next' | 
					
						
							|  |  |  | import type { NodeProps } from 'reactflow' | 
					
						
							|  |  |  | import { RiHome5Fill } from '@remixicon/react' | 
					
						
							|  |  |  | import Tooltip from '@/app/components/base/tooltip' | 
					
						
							|  |  |  | import { NodeSourceHandle } from '@/app/components/workflow/nodes/_base/components/node-handle' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const IterationStartNode = ({ id, data }: NodeProps) => { | 
					
						
							|  |  |  |   const { t } = useTranslation() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return ( | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |     <div className='nodrag group mt-1 flex h-11 w-11 items-center justify-center rounded-2xl border border-workflow-block-border bg-workflow-block-bg shadow-xs'> | 
					
						
							| 
									
										
										
										
											2024-09-10 15:23:16 +08:00
										 |  |  |       <Tooltip popupContent={t('workflow.blocks.iteration-start')} asChild={false}> | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |         <div className='flex h-6 w-6 items-center justify-center rounded-full border-[0.5px] border-components-panel-border-subtle bg-util-colors-blue-brand-blue-brand-500'> | 
					
						
							|  |  |  |           <RiHome5Fill className='h-3 w-3 text-text-primary-on-surface' /> | 
					
						
							| 
									
										
										
										
											2024-09-10 15:23:16 +08:00
										 |  |  |         </div> | 
					
						
							|  |  |  |       </Tooltip> | 
					
						
							|  |  |  |       <NodeSourceHandle | 
					
						
							|  |  |  |         id={id} | 
					
						
							|  |  |  |         data={data} | 
					
						
							|  |  |  |         handleClassName='!top-1/2 !-right-[9px] !-translate-y-1/2' | 
					
						
							|  |  |  |         handleId='source' | 
					
						
							|  |  |  |       /> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |   ) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export const IterationStartNodeDumb = () => { | 
					
						
							|  |  |  |   const { t } = useTranslation() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   return ( | 
					
						
							| 
									
										
										
										
											2025-04-10 17:15:48 +08:00
										 |  |  |     <div className='nodrag relative left-[17px] top-[21px] z-[11] flex h-11 w-11 items-center justify-center rounded-2xl border border-workflow-block-border bg-workflow-block-bg'> | 
					
						
							| 
									
										
										
										
											2024-09-10 15:23:16 +08:00
										 |  |  |       <Tooltip popupContent={t('workflow.blocks.iteration-start')} asChild={false}> | 
					
						
							| 
									
										
										
										
											2025-03-21 17:41:03 +08:00
										 |  |  |         <div className='flex h-6 w-6 items-center justify-center rounded-full border-[0.5px] border-components-panel-border-subtle bg-util-colors-blue-brand-blue-brand-500'> | 
					
						
							|  |  |  |           <RiHome5Fill className='h-3 w-3 text-text-primary-on-surface' /> | 
					
						
							| 
									
										
										
										
											2024-09-10 15:23:16 +08:00
										 |  |  |         </div> | 
					
						
							|  |  |  |       </Tooltip> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |   ) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default memo(IterationStartNode) |