import { WorkflowDiagramBaseStepNode } from '@/workflow/components/WorkflowDiagramBaseStepNode'; import { WorkflowDiagramStepNodeData } from '@/workflow/types/WorkflowDiagram'; import { assertUnreachable } from '@/workflow/utils/assertUnreachable'; import { useTheme } from '@emotion/react'; import styled from '@emotion/styled'; import { IconCode, IconMail, IconPlaylistAdd } from 'twenty-ui'; const StyledStepNodeLabelIconContainer = styled.div` align-items: center; background: ${({ theme }) => theme.background.transparent.light}; border-radius: ${({ theme }) => theme.spacing(1)}; display: flex; justify-content: center; padding: ${({ theme }) => theme.spacing(1)}; `; export const WorkflowDiagramStepNodeBase = ({ data, RightFloatingElement, }: { data: WorkflowDiagramStepNodeData; RightFloatingElement?: React.ReactNode; }) => { const theme = useTheme(); const renderStepIcon = () => { switch (data.nodeType) { case 'trigger': { return ( ); } case 'condition': { return null; } case 'action': { switch (data.actionType) { case 'CODE': { return ( ); } case 'SEND_EMAIL': { return ( ); } } } } return assertUnreachable(data); }; return ( ); };