from rich.console import Console
from rich.syntax import Syntax

def print_preview(code: str, language: str) -> None:
    """Pretty prints the code generated by bluffy"""
    print()
    console = Console()
    # Comment from docs:
    # “ansi_dark” or “ansi_light” which will use the color theme configured by the terminal.
    console.print(Syntax(code, language, line_numbers=True, theme="ansi_dark"))
    print()

def print_payload_preview(code: str, language: str) -> None:
    """Pretty prints the code generated by bluffy"""
    print()
    console = Console()
    # Comment from docs:
    # “ansi_dark” or “ansi_light” which will use the color theme configured by the terminal.
    console.print(Syntax(code, language, line_numbers=True, theme="ansi_dark"))
    print()