import React from "react";
import style from './filterCheckBox.module.sass';

export default function(props) {

        const {indexKey, typeCheckbox, idCheckbox, valueLabel, onChange, checked, count} = props;
        console.log(checked);
        return(
            <div className={style.brandsElement} key={indexKey}>
                <input type={"checkbox"}
                       id={`${typeCheckbox}${idCheckbox}`}
                       onChange={(e) => onChange(valueLabel, checked)}
                       checked={checked}
                />
                <label htmlFor={`${typeCheckbox}${idCheckbox}`}>{valueLabel}({count})</label>
            </div>
        );

}