import type { ISheetSlicerInfo, ISheetTimelineInfo } from '@univerjs-pro/sheets-slicer';
import { FWorksheet } from '@univerjs/sheets/facade';
import { FSheetSlicer } from './f-slicer';
import { FSheetSlicerBuilder } from './f-slicer-builder';
import { FSheetTimeline } from './f-timeline';
import { FSheetTimelineBuilder } from './f-timeline-builder';
/** @ignore */
export interface IFWorksheetSlicerMixin {
    /**
     * Creates a detached Slicer Builder using the stable original source field ID, not its name/report field ID.
     * Set an explicit same-Workbook source before build; Table references are Slicer-only. Host/source sheets may differ.
     *
     * @param {string} fieldId Stable source ID: Table column.id or Pivot getSourceFieldsInfo().id.
     * @returns {FSheetSlicerBuilder} A detached configuration Builder; no command has run.
     * @see {@link FWorksheet.insertSlicer}
     * @example
     * ```ts
     * const builder = fWorksheet.newSlicer(field.id);
     * ```
     */
    newSlicer(fieldId: string): FSheetSlicerBuilder;
    /**
     * Creates a detached Timeline Builder using the stable original source field ID, not its name/report field ID.
     * Set an explicit same-Workbook source before build; Table references are Slicer-only. Host/source sheets may differ.
     * Only supported original Pivot date fields are accepted, not Table/text/calculated/grouped fields.
     *
     * @param {string} fieldId Stable original supported Pivot date source ID from getSourceFieldsInfo().id.
     * @returns {FSheetTimelineBuilder} A detached configuration Builder; no command has run.
     * @see {@link FWorksheet.insertTimeline}
     * @example
     * ```ts
     * const builder = fWorksheet.newTimeline(field.id);
     * ```
     */
    newTimeline(fieldId: string): FSheetTimelineBuilder;
    /**
     * Inserts a Slicer from detached information on this host Worksheet, independently of the source sheet/selection.
     * All presentation dimensions are CSS px; rowHeight persists as Math.round(px * 9525). Omitted name is generated
     * uniquely at command execution; explicit names must be nonempty/unique (case-insensitive), captions nonempty (<=32767),
     * and style names available in this Workbook. Anchor and absolute position together are invalid. Omitted placement
     * is deterministic, not selection/viewport-based; omitted size is 220 x 280 CSS px.
     * Same-field insertion reuses shared cache/filter/options rather than resetting them. Returns only after command
     * acceptance and exact hosted view/Drawing creation, not remote saving/rendering. Ordinary refusal rejects.
     * Exceptional inverse-recovery listener failure rejects and can retain a coherent forward view/Drawing pair;
     * callers can re-read/reconcile.
     *
     * @param {ISheetSlicerInfo} info Detached source/settings/placement with CSS px dimensions.
     * @returns {Promise<FSheetSlicer>} A live facade after local command acceptance.
     * @throws The Promise rejects for invalid/unavailable source, name/style/placement, permission refusal or command/recovery failure.
     * @see {@link FSheetSlicer.getId}
     * @example
     * ```ts
     * const control = await fWorksheet.insertSlicer(builder.build());
     * ```
     */
    insertSlicer(info: ISheetSlicerInfo): Promise<FSheetSlicer>;
    /**
     * Inserts a Timeline from detached information on this host Worksheet, independently of the source sheet/selection.
     * All presentation dimensions are CSS px. Omitted name is generated
     * uniquely at command execution; explicit names must be nonempty/unique (case-insensitive), captions nonempty (<=32767),
     * and style names available in this Workbook. Anchor and absolute position together are invalid. Omitted placement
     * is deterministic, not selection/viewport-based; omitted size is 420 x 140 CSS px.
     * Same-field insertion reuses shared cache/filter/options rather than resetting them. Returns only after command
     * acceptance and exact hosted view/Drawing creation, not remote saving/rendering. Ordinary refusal rejects.
     * Exceptional inverse-recovery listener failure rejects and can retain a coherent forward view/Drawing pair;
     * callers can re-read/reconcile.
     *
     * @param {ISheetTimelineInfo} info Detached source/settings/placement with CSS px dimensions.
     * @returns {Promise<FSheetTimeline>} A live facade after local command acceptance.
     * @throws The Promise rejects for invalid/unavailable source, name/style/placement, permission refusal or command/recovery failure.
     * @see {@link FSheetTimeline.getId}
     * @example
     * ```ts
     * const control = await fWorksheet.insertTimeline(builder.build());
     * ```
     */
    insertTimeline(info: ISheetTimelineInfo): Promise<FSheetTimeline>;
    /**
     * Returns a hosted Slicer by business view ID within this Worksheet, not by Drawing ID.
     * Includes valid resource-free Drawing placeholders but excludes unattached business views and foreign-host drawings.
     *
     * @param {string} viewId The stable view identity returned by FSheetSlicer.getId.
     * @returns {FSheetSlicer | null} A live hosted facade or null when no match exists.
     * @see {@link FSheetSlicer.getId}
     * @example
     * ```ts
     * const control = fWorksheet.getSlicer("view-1");
     * ```
     */
    getSlicer(viewId: string): FSheetSlicer | null;
    /**
     * Returns all Slicers hosted by this Worksheet, in official Worksheet Drawing order.
     * Includes valid resource-free Drawing placeholders but excludes unattached business views and foreign-host drawings.
     *
     * @returns {FSheetSlicer[]} A defensive list in the scope/order described above.
     * @see {@link FSheetSlicer.getId}
     * @example
     * ```ts
     * const controls = fWorksheet.getSlicers();
     * ```
     */
    getSlicers(): FSheetSlicer[];
    /**
     * Returns a hosted Timeline by business view ID within this Worksheet, not by Drawing ID.
     * Includes valid resource-free Drawing placeholders but excludes unattached business views and foreign-host drawings.
     *
     * @param {string} viewId The stable view identity returned by FSheetTimeline.getId.
     * @returns {FSheetTimeline | null} A live hosted facade or null when no match exists.
     * @see {@link FSheetTimeline.getId}
     * @example
     * ```ts
     * const control = fWorksheet.getTimeline("view-1");
     * ```
     */
    getTimeline(viewId: string): FSheetTimeline | null;
    /**
     * Returns all Timelines hosted by this Worksheet, in official Worksheet Drawing order.
     * Includes valid resource-free Drawing placeholders but excludes unattached business views and foreign-host drawings.
     *
     * @returns {FSheetTimeline[]} A defensive list in the scope/order described above.
     * @see {@link FSheetTimeline.getId}
     * @example
     * ```ts
     * const controls = fWorksheet.getTimelines();
     * ```
     */
    getTimelines(): FSheetTimeline[];
}
/** @ignore */
export declare class FWorksheetSlicerMixin extends FWorksheet implements IFWorksheetSlicerMixin {
    newSlicer(fieldId: string): FSheetSlicerBuilder;
    newTimeline(fieldId: string): FSheetTimelineBuilder;
    insertSlicer(info: ISheetSlicerInfo): Promise<FSheetSlicer>;
    insertTimeline(info: ISheetTimelineInfo): Promise<FSheetTimeline>;
    getSlicer(viewId: string): FSheetSlicer | null;
    getSlicers(): FSheetSlicer[];
    getTimeline(viewId: string): FSheetTimeline | null;
    getTimelines(): FSheetTimeline[];
}
declare module '@univerjs/sheets/facade' {
    interface FWorksheet extends IFWorksheetSlicerMixin {
    }
}
