import React from "react";
import classes from "./classes.module.scss";
import FolderContainer from "../FolderContainer";
import { IDashBoardFolder } from "@Front/Components/LayoutTemplates/DefaultNotaryDashboard";

type IProps = {
	folders: IDashBoardFolder[];
	onSelectedFolder?: (folder: IDashBoardFolder) => void;
	onCloseLeftSide?: () => void;
};

type IState = {};

export default class FolderList extends React.Component<IProps, IState> {
	public override render(): JSX.Element {
		return <div className={classes["root"]}>
			{this.props.folders.map((folder) => {
				return <div onClick={this.props.onCloseLeftSide} key={folder.uid}>
					<FolderContainer folder={folder} onSelectedFolder={this.props.onSelectedFolder} />;
				</div>
			})};
		</div>;
	}
}
