import { FC } from "react";
import { DageTreeActionsProps } from "./types";
import { DageTreeTitle } from "./Title";
import { TreeActions } from "./style";

export const DageTreeActions: FC<DageTreeActionsProps> = ({
  maxLevel,
  onAdd,
  onEdit,
  onDelete,
  ...props
}) => {
  return (
    <TreeActions
      blockNode
      defaultExpandAll
      virtual={false}
      {...props}
      titleRender={(data) => (
        <DageTreeTitle
          data={data}
          treeData={props.treeData}
          maxLevel={maxLevel}
          onAdd={onAdd}
          onEdit={onEdit}
          onDelete={onDelete}
        />
      )}
    />
  );
};

export * from "./types";
export * from "./utils";
