import { computed } from 'vue' import type { BaseNodeProps, StandardNodeOptions } from './types' export function useStandardNode( props: BaseNodeProps, options: StandardNodeOptions ) { const bodyItems = computed(() => { return options.body ? options.body(props) : [] }) const badge = computed(() => { if (typeof options.badge === 'function') { return options.badge(props) } return options.badge }) const status = computed(() => options.status?.(props)) return { props, definition: options, bodyItems, badge, status } }