package formatter import ( "fmt" "strings" "git.db.org.ai/dborg/internal/models" "git.db.org.ai/dborg/internal/utils" ) func FormatTelegramResults(response *models.TelegramPhoneResponse, asJSON bool) error { if asJSON { return utils.PrintJSON(response) } PrintSection("📱 Telegram Phone Lookup") fmt.Printf("%s: %s\n", Cyan("Identifier"), response.Identifier) if response.TelegramID != "" { fmt.Printf("%s: %s\n", Cyan("Telegram ID"), response.TelegramID) } if response.PhoneNumber != "" { fmt.Printf("%s: %s\n", Cyan("Phone Number"), Green(response.PhoneNumber)) } else { fmt.Printf("%s: %s\n", Cyan("Phone Number"), Red("Not found")) } if len(response.Contacts) > 0 { fmt.Printf("%s: %s\n", Cyan("Contacts"), strings.Join(response.Contacts, ", ")) } if len(response.Groups) > 0 { fmt.Printf("%s:\n", Cyan("Groups")) for _, g := range response.Groups { fmt.Printf(" • %s\n", g) } } fmt.Println() PrintDivider() fmt.Printf("%s: ", Cyan("Credits Remaining")) if response.Credits.Unlimited { fmt.Printf("%s\n", Green("Unlimited")) } else { fmt.Printf("%s\n", FormatCredits(int64(response.Credits.Remaining))) } return nil }