import React from "react";
import { ToolbarButton } from "./toolbarButton";
import { BorderLine } from "./toolbarButtonContainerBorderLine";
import { TypeToolbarButtons } from "./typeButtons";

type TProps = {
    buttons: Array<{type: TypeToolbarButtons, onClick: () => void}>
}

export const ButtonContainer:React.FC<TProps> = React.memo((props) => {
    return <div className="toolbar-button-container">
        <BorderLine />
        {props.buttons.map(button => <ToolbarButton onClick={button.onClick} type={button.type} />)}
        <BorderLine />
    </div>
})