// 节点卡片
import { LayersType } from '@/utils/nodes.types';
import React from 'react';
import Component from './Component';
import Condition from './Condition';

export default function EasyvNodeCard(props) {
  const { data = {} } = props;
  const { type } = data;
  const ELEMENT = () => {
    switch (type) {
      case LayersType.CONDITION:
        return <Condition {...data} />;
      default:
        return <Component {...data} />;
    }
  };

  return ELEMENT();
}
