import type { ISparklineGroup, SparklineTypeEnum } from '@univerjs-pro/sheets-sparkline';
import type { IRange } from '@univerjs/core';
import { FWorksheet } from '@univerjs/sheets/facade';
import { FSparkline } from './f-sparkline';
import { FSparklineGroup } from './f-sparkline-group';
/**
 * @ignore
 */
export interface IFWorksheetSparklineMixin {
    /**
     * @description Add sparkline to the worksheet.
     * @param {IRange[]} sourceRanges Source data location for sparklines
     * @param {IRange[]} targetRanges Where to place sparklines
     * @param {SparklineTypeEnum} type The type of Sparklines
     * @returns {FSparkline | undefined} Returns the sparkline instance for the next call
     *
     * @example
     * ```ts
     * const fWorkbook = univerAPI.getActiveWorkbook();
     * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
     * if (!fWorksheet) return;
     *
     * // Create a sparkline in the range A10, with the data source in the range A1:A7.
     * const sourceRanges = [fWorksheet.getRange('A1:A7').getRange()];
     * const targetRanges = [fWorksheet.getRange('A10').getRange()];
     * const sparkline = fWorksheet.addSparkline(sourceRanges, targetRanges, univerAPI.Enum.SparklineTypeEnum.LINE_CHART);
     * console.log('sparkline instance', sparkline);
     * ```
     */
    addSparkline(sourceRanges: IRange[], targetRanges: IRange[], type: SparklineTypeEnum.LINE_CHART): FSparkline | undefined;
    /**
     * @description Get all sparklines in the worksheet.
     * @returns {Map<string, ISparklineGroup> | undefined} - The key is sparkline group id.
     *
     * @example
     * ```ts
     * const fWorkbook = univerAPI.getActiveWorkbook();
     * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
     * if (!fWorksheet) return;
     *
     * // Get all sparklines in the current worksheet
     * const allSparkline = fWorksheet.getAllSubSparkline();
     * console.log('allSparkline', allSparkline);
     * ```
     */
    getAllSubSparkline(): Map<string, ISparklineGroup> | undefined;
    /**
     * @description Group the sparklines in the selection into a new sparkline group
     * @param {IRange[]} ranges - The selection range to be grouped
     * @returns {void}
     *
     * @example
     * ```ts
     * const fWorkbook = univerAPI.getActiveWorkbook();
     * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
     * if (!fWorksheet) return;
     *
     * // Create a sparkline in the range A10, with the data source in the range A1:A7.
     * const firstSparkline = fWorksheet.addSparkline(
     *   [fWorksheet.getRange('A1:A7').getRange()],
     *   [fWorksheet.getRange('A10').getRange()]
     * );
     * // Create a sparkline in the range B10, with the data source in the range B1:B7.
     * const secondSparkline = fWorksheet.addSparkline(
     *   [fWorksheet.getRange('B1:B7').getRange()],
     *   [fWorksheet.getRange('B10').getRange()]
     * );
     * console.log('debugger', fWorksheet.getAllSubSparkline().size); // 2
     *
     * // Compose the two sparklines into one group after 3 seconds
     * setTimeout(() => {
     *   fWorksheet.composeSparkline([fWorksheet.getRange('A10:B10').getRange()]);
     *   console.log('debugger', fWorksheet.getAllSubSparkline().size); // 1
     * }, 3000);
     * ```
     */
    composeSparkline(ranges: IRange[]): void;
    /**
     * @description Split the sparkline group within the current selection
     * @param {IRange[]} ranges - The selection range to be ungrouped
     *
     * @example
     * ```ts
     * const fWorkbook = univerAPI.getActiveWorkbook();
     * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
     * if (!fWorksheet) return;
     *
     * // Create a sparkline in the range A10, with the data source in the range A1:A7.
     * const firstSparkline = fWorksheet.addSparkline(
     *   [fWorksheet.getRange('A1:A7').getRange()],
     *   [fWorksheet.getRange('A10').getRange()]
     * );
     * // Create a sparkline in the range B10, with the data source in the range B1:B7.
     * const secondSparkline = fWorksheet.addSparkline(
     *   [fWorksheet.getRange('B1:B7').getRange()],
     *   [fWorksheet.getRange('B10').getRange()]
     * );
     *
     * // Compose the two sparklines into one group
     * fWorksheet.composeSparkline([fWorksheet.getRange('A10:B10').getRange()]);
     * console.log('debugger', fWorksheet.getAllSubSparkline().size); // 1
     *
     * // Uncompose the sparkline group after 3 seconds
     * setTimeout(() => {
     *   fWorksheet.unComposeSparkline([fWorksheet.getRange('A10:B10').getRange()]);
     *   console.log('debugger', fWorksheet.getAllSubSparkline().size); // 2
     * }, 3000);
     * ```
     */
    unComposeSparkline(ranges: IRange[]): void;
    /**
     * @description Get the sparkline instance of the current cell
     * @param {number} row - The row index of the cell, start at 0.
     * @param {number} col - The column index of the cell, start at 0.
     * @returns {FSparkline | undefined} Returns the sparkline instance for the next call
     *
     * @example
     * ```ts
     * const fWorkbook = univerAPI.getActiveWorkbook();
     * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
     * if (!fWorksheet) return;
     *
     * // Create a sparkline in the range A10, with the data source in the range A1:A7.
     * const sourceRanges = [fWorksheet.getRange('A1:A7').getRange()];
     * const targetRanges = [fWorksheet.getRange('A10').getRange()];
     * const sparkline = fWorksheet.addSparkline(sourceRanges, targetRanges);
     *
     * console.log('Cell A10: ', fWorksheet.getSparklineByCell(9, 0));
     * console.log('Cell A11: ', fWorksheet.getSparklineByCell(10, 0));
     * ```
     */
    getSparklineByCell(row: number, col: number): FSparkline | undefined;
    /**
     * @description Get the sparkline groups instance of the current cell
     * @param {number} row - The row index of the cell, start at 0.
     * @param {number} col - The column index of the cell, start at 0.
     * @returns {FSparklineGroup | undefined} Returns the sparkline group instance for the next call
     *
     * @example
     * ```ts
     * const fWorkbook = univerAPI.getActiveWorkbook();
     * const fWorksheet = fWorkbook.getSheetByName('Sheet1');
     * if (!fWorksheet) return;
     *
     * // Create a sparkline in the range A10, with the data source in the range A1:A7.
     * const firstSparkline = fWorksheet.addSparkline(
     *   [fWorksheet.getRange('A1:A7').getRange()],
     *   [fWorksheet.getRange('A10').getRange()]
     * );
     * // Create a sparkline in the range B10, with the data source in the range B1:B7.
     * const secondSparkline = fWorksheet.addSparkline(
     *   [fWorksheet.getRange('B1:B7').getRange()],
     *   [fWorksheet.getRange('B10').getRange()]
     * );
     * console.log('Cell A10: ', fWorksheet.getSparklineGroupByCell(9, 0));
     *
     * // Compose the two sparklines into one group after 3 seconds
     * setTimeout(() => {
     *   fWorksheet.composeSparkline([fWorksheet.getRange('A10:B10').getRange()]);
     *   console.log('Cell A10: ', fWorksheet.getSparklineGroupByCell(9, 0));
     * }, 3000);
     * ```
     */
    getSparklineGroupByCell(row: number, col: number): FSparklineGroup | undefined;
}
export declare class FWorksheetSparklineMixin extends FWorksheet implements IFWorksheetSparklineMixin {
    addSparkline(sourceRanges: IRange[], targetRanges: IRange[], type: SparklineTypeEnum.LINE_CHART): FSparkline | undefined;
    getAllSubSparkline(): Map<string, ISparklineGroup> | undefined;
    composeSparkline(ranges: IRange[]): void;
    unComposeSparkline(ranges: IRange[]): void;
    getSparklineByCell(row: number, col: number): FSparkline | undefined;
    getSparklineGroupByCell(row: number, col: number): FSparklineGroup | undefined;
}
declare module '@univerjs/sheets/facade' {
    interface FWorksheet extends IFWorksheetSparklineMixin {
    }
}
