import QRCode from "qrcode";

export async function generateQRCodeDataURL(
  url: string,
  options?: { width?: number }
): Promise<string> {
  return QRCode.toDataURL(url, {
    width: options?.width ?? 300,
    margin: 2,
    color: { dark: "#1a1a2e", light: "#ffffff" },
  });
}
