import _taggedTemplateLiteralLoose from "@babel/runtime/helpers/taggedTemplateLiteralLoose";

var _templateObject;

import * as React from 'react';
import { css } from '@emotion/css';
import TreeNode from "./TreeNode";

/**
 * The root of the hierarchy tree
 */
function Tree(_ref) {
  var children = _ref.children,
      label = _ref.label,
      _ref$lineHeight = _ref.lineHeight,
      lineHeight = _ref$lineHeight === void 0 ? '20px' : _ref$lineHeight,
      _ref$lineWidth = _ref.lineWidth,
      lineWidth = _ref$lineWidth === void 0 ? '1px' : _ref$lineWidth,
      _ref$lineColor = _ref.lineColor,
      lineColor = _ref$lineColor === void 0 ? 'black' : _ref$lineColor,
      _ref$nodePadding = _ref.nodePadding,
      nodePadding = _ref$nodePadding === void 0 ? '5px' : _ref$nodePadding,
      _ref$lineStyle = _ref.lineStyle,
      lineStyle = _ref$lineStyle === void 0 ? 'solid' : _ref$lineStyle,
      _ref$lineBorderRadius = _ref.lineBorderRadius,
      lineBorderRadius = _ref$lineBorderRadius === void 0 ? '5px' : _ref$lineBorderRadius;
  return /*#__PURE__*/React.createElement("ul", {
    className: css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n        padding-inline-start: 0;\n        margin: 0;\n        display: flex;\n\n        --line-height: ", ";\n        --line-width: ", ";\n        --line-color: ", ";\n        --line-border-radius: ", ";\n        --line-style: ", ";\n        --node-padding: ", ";\n\n        --tree-line-height: var(--line-height, 20px);\n        --tree-line-width: var(--line-width, 1px);\n        --tree-line-color: var(--line-color, black);\n        --tree-line-border-radius: var(--line-border-radius, 5px);\n        --tree-node-line-style: var(--line-style, solid);\n        --tree-node-padding: var(--node-padding, 5px);\n      "])), lineHeight, lineWidth, lineColor, lineBorderRadius, lineStyle, nodePadding)
  }, /*#__PURE__*/React.createElement(TreeNode, {
    label: label
  }, children));
}

export default Tree;