import { ListDateGroup } from '../list-date-group';
import { AdditionalServiceCategory } from '../../model/types';
import { FaceAuthListProps } from '../../model/face-auth/types';

export const FaceAuthList = ({
    listItems,
    mid
}: FaceAuthListProps) => {
    const getListDateGroup = () => {
        let rs = [];
        for (const [key, value] of Object.entries(listItems)) {
            rs.push(
                <ListDateGroup
                    additionalServiceCategory={AdditionalServiceCategory.FaceAuth}
                    key={key}
                    date={key}
                    items={value}
                    mid={mid}
                ></ListDateGroup>
            );
        }
        return rs;
    };

    return (
        <>
            <div className="transaction-list">
                {getListDateGroup()}
            </div>
        </>
    );
};
