export function discoverCardAvatarUrl( avatar: string | null | undefined, avatarVisibility: string, ): string | null { if (avatarVisibility !== "public") { return null; } const t = typeof avatar === "string" ? avatar.trim() : ""; return t.length > 0 ? t : null; } export function discoverCardLocationLine( discoverVisible: boolean, discoverShowLocation: boolean, discoverLocation: string | null | undefined, ): string | null { if (!discoverVisible || !discoverShowLocation) { return null; } const t = typeof discoverLocation === "string" ? discoverLocation.trim() : ""; return t.length > 0 ? t : null; }