import type { ReactNode } from 'react'
import {
DropdownMenuItem,
DropdownMenuSeparator,
DropdownMenuSub,
DropdownMenuSubContent,
DropdownMenuSubTrigger,
} from '@sim/emcn'
import { Folder } from '@sim/emcn/icons'
export interface MoveOptionNode {
value: string
label: string
children: MoveOptionNode[]
}
export function renderMoveOption(
option: MoveOptionNode,
onMove: (value: string) => void
): ReactNode {
if (option.children.length === 0) {
return (
onMove(option.value)}>
{option.label}
)
}
return (
{option.label}
onMove(option.value)}>Move here
{option.children.map((child) => renderMoveOption(child, onMove))}
)
}