import {Draw} from 'effect-tree'
const emptyPart = Draw.empty
const textPart = Draw.text('foo')
const rowPart = Draw.row.top.right([textPart])
const columnPart = Draw.column.right([textPart])
const match = Draw.matchPart(
'empty',
s => `text=${s}`,
() => 'row',
() => 'column',
)
expect(match(emptyPart), 'empty').toBe('empty')
expect(match(textPart), 'text').toBe('text=foo')
expect(match(rowPart), 'row').toBe('row')
expect(match(columnPart), 'column').toBe('column')
Match part by type.