import React from "react";
import TreeList from "./tree-list";
import { connect } from "redux-bundler-react";

class DefaultsContainer extends React.Component {
  render() {
    const { userDefaultLayers, treeRootNode } = this.props;

    return (
      <div>
        <TreeList
          items={userDefaultLayers}
          isFolder={true}
          collapsed={false}
          listStyle={{ padding: 0 }}
          showUserDefaultLayers={true}
        />
      </div>
    );
  }
}

export default connect(
  "selectUserDefaultLayers",
  "selectTreeRootNode",
  DefaultsContainer
);
