import { Context } from 'koishi';
import { StatProcessOptions } from './stat';
import { StatRecord } from './index';
export declare class Renderer {
    private ctx;
    constructor(ctx: Context);
    /**
     * 将HTML内容转换为图片
     * @param {string} html - 要渲染的HTML内容
     * @param {Object} options - 渲染选项
     * @param {number} [options.width] - 图片宽度
     * @returns {Promise<Buffer>} 图片Buffer数据
     */
    htmlToImage(html: string): Promise<Buffer>;
    /**
     * 将统计记录转换为图表数据
     * @param {StatRecord[]} records - 统计记录数组
     * @param {keyof StatRecord} key - 统计键名
     * @param {StatProcessOptions} options - 处理选项
     * @returns {Array<{name: string, value: number, time: string, rawTime: Date}>} 转换后的图表数据
     */
    recordsToChartData(records: StatRecord[], key: keyof StatRecord, options?: StatProcessOptions): Array<{
        name: string;
        value: number;
        time: string;
        rawTime: Date;
    }>;
    /**
     * 生成统计数据的图片
     * @param {StatRecord[]} records - 统计记录数组
     * @param {keyof StatRecord} key - 统计键名
     * @param {string} title - 图表标题
     * @param {StatProcessOptions} options - 处理选项
     * @returns {Promise<Buffer[]>} 生成的图片Buffer数组
     */
    generateStatImage(records: StatRecord[], key: keyof StatRecord, title: string, options?: StatProcessOptions): Promise<Buffer[]>;
    /**
     * 生成综合统计图，将用户的所有统计信息整合到一张图中
     * @param {Array<{records: StatRecord[], title: string, key: keyof StatRecord, options?: StatProcessOptions}>} datasets - 多个数据集
     * @param {string} mainTitle - 主标题
     * @returns {Promise<Buffer[]>} 生成的图片Buffer数组
     */
    generateCombinedStatImage(datasets: Array<{
        records: StatRecord[];
        title: string;
        key: keyof StatRecord;
        options?: StatProcessOptions;
    }>, mainTitle: string): Promise<Buffer[]>;
    /**
     * 渲染排行榜图片
     * @param {Array} data 排名数据
     * @param {string} title 标题
     * @returns {Promise<Buffer>} 图片 Buffer
     */
    renderRankingImage(data: Array<{
        userId: string;
        userName: string;
        currentCount: number;
        previousCount: number;
        diff: number;
        rank: number;
        prevRank?: number;
        rankChange?: number;
    }>, title: string): Promise<Buffer>;
    /**
     * 生成表格HTML
     * @param {Array<{name: string, value: number, time: string}>} data - 表格数据
     * @param {keyof StatRecord} key - 数据类型
     * @param {string} headerColor - 表头颜色
     * @returns {string} 表格HTML
     * @private
     */
    private generateTableHTML;
}
