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

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

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

export default connect(
  "selectFavoriteLayers",
  "selectTreeRootNode",
  FavoritesContainer
);
