import { Flex, HStack, StackProps, Text } from '@chakra-ui/react'
import { StepType, DraggableStepType } from 'models'
import { useStepDnd } from 'contexts/GraphDndContext'
import React, { useEffect, useState } from 'react'
import { StepIcon } from './StepIcon'
import { StepTypeLabel } from './StepTypeLabel'
export const StepCard = ({
type,
onMouseDown,
}: {
type: DraggableStepType
onMouseDown: (e: React.MouseEvent, type: DraggableStepType) => void
}) => {
const { draggedStepType } = useStepDnd()
const [isMouseDown, setIsMouseDown] = useState(false)
useEffect(() => {
setIsMouseDown(draggedStepType === type)
}, [draggedStepType, type])
const handleMouseDown = (e: React.MouseEvent) => onMouseDown(e, type)
return (
{!isMouseDown ? (
<>
>
) : (
Placeholder
)}
)
}
export const StepCardOverlay = ({
type,
...props
}: StackProps & { type: StepType }) => {
return (
)
}