import { useCachedDaoWhitelist } from "./useCached";
import isEmpty from "lodash/isEmpty";
import map from "lodash/map";
export const useVerified = (usernames) => {
    const whitelistMembers = map(useCachedDaoWhitelist().rows, "user");
    const verifiedUsers = isEmpty(usernames) ? undefined : usernames?.filter((user) => whitelistMembers.includes(user));
    return { verifiedUsers };
};
export const useVerifiedPosts = (posts) => {
    const postUsers = posts.map((p) => p?.author?.username);
    const { verifiedUsers } = useVerified(postUsers);
    return { verifiedUsers };
};
//# sourceMappingURL=useVerified.js.map