export const formatUserDetails = (userDetails) => {
    if (userDetails && Array.isArray(userDetails)) {
        return userDetails.map(({ user }) => ({
            id: user.id,
            name: user.name,
            emailId: user.emailId,
        }));
    }
    return [];
};
export const findUserByName = (name, users) => {
    const matchedUser = users.find((user) => `@${user.name.replace(/\s+/g, '')}` === name);
    return matchedUser ? matchedUser.emailId : null;
};
//# sourceMappingURL=commentCommonUtils.js.map