import type { FSheetPivotChart } from '@univerjs-pro/sheets-pivot-chart/facade';
import type { FPivotTable } from '@univerjs-pro/sheets-pivot/facade';
import type { ISheetSlicerInfo, SheetSlicerAnchorSpec } from '@univerjs-pro/sheets-slicer';
type SourceSetter = 'setTableReference' | 'setPivotTable' | 'setPivotTableReference' | 'setPivotChart' | 'setPivotChartReference';
/** A source-locked Builder whose fluent methods cannot recover source setters. */
export type FLinkedSheetSlicerBuilder = {
    [K in keyof Omit<FSheetSlicerBuilder, SourceSetter>]: FSheetSlicerBuilder[K] extends (...args: infer TArgs) => infer TResult ? TResult extends FSheetSlicerBuilder ? (...args: TArgs) => FLinkedSheetSlicerBuilder : FSheetSlicerBuilder[K] : FSheetSlicerBuilder[K];
};
/** Configuration copy from a live facade, with its source permanently locked. */
export type FBoundSheetSlicerBuilder = FLinkedSheetSlicerBuilder;
/**
 * Detached Slicer configuration; all dimensions including rowHeight use CSS px. Setters/build do not run commands.
 * @hideconstructor
 */
export declare class FSheetSlicerBuilder {
    private readonly _unitId;
    private readonly _fieldId;
    private readonly _resolveSource;
    private readonly _locked;
    private _info;
    /**
     * Resolves the Builder field ID as a stable Table column ID on a same-Workbook source sheet.
     * Never accepts a display name/index. Does not insert or modify a model.
     *
     * @param {{ subUnitId: string; tableId: string }} reference Explicit same-Workbook source identity.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @throws If required source/host data is unavailable, input is unsupported, or the documented query/command fails.
     * Source replacement through a cast on a prelinked/bound Builder also throws.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setTableReference({ subUnitId: "source", tableId: "table" });
     * ```
     */
    setTableReference(reference: {
        subUnitId: string;
        tableId: string;
    }): this;
    /**
     * Resolves the Builder original source field ID against a same-Workbook PivotTable, without inserting.
     * Display names/report tableFieldIds are not substitutes for stable source IDs.
     *
     * @param {FPivotTable} pivotTable Same-Workbook PivotTable source facade.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @throws If required source/host data is unavailable, input is unsupported, or the documented query/command fails.
     * Source replacement through a cast on a prelinked/bound Builder also throws.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setPivotTable(pivotTable);
     * ```
     */
    setPivotTable(pivotTable: FPivotTable): this;
    /**
     * Resolves the Builder original source field ID against an explicit same-Workbook PivotTable reference.
     * Does not insert or mutate filtering.
     *
     * @param {{ unitId: string; subUnitId: string; pivotTableId: string }} reference Explicit same-Workbook source identity.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @throws If required source/host data is unavailable, input is unsupported, or the documented query/command fails.
     * Source replacement through a cast on a prelinked/bound Builder also throws.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setPivotTableReference({ unitId: "unit", subUnitId: "source", pivotTableId: "pivot" });
     * ```
     */
    setPivotTableReference(reference: {
        unitId: string;
        subUnitId: string;
        pivotTableId: string;
    }): this;
    /**
     * Resolves the Builder original source field ID against a same-Workbook PivotChart without inserting.
     * Linked charts normalize to their owner PivotTable; owned charts retain their owned report connection.
     *
     * @param {FSheetPivotChart} pivotChart Same-Workbook PivotChart source facade.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @throws If required source/host data is unavailable, input is unsupported, or the documented query/command fails.
     * Source replacement through a cast on a prelinked/bound Builder also throws.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setPivotChart(pivotChart);
     * ```
     */
    setPivotChart(pivotChart: FSheetPivotChart): this;
    /**
     * Resolves the Builder original source field ID against an explicit same-Workbook PivotChart reference.
     * Linked charts normalize to their owner; this does not insert or modify filtering.
     *
     * @param {{ unitId: string; subUnitId: string; pivotChartId: string }} reference Explicit same-Workbook source identity.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @throws If required source/host data is unavailable, input is unsupported, or the documented query/command fails.
     * Source replacement through a cast on a prelinked/bound Builder also throws.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setPivotChartReference({ unitId: "unit", subUnitId: "source", pivotChartId: "chart" });
     * ```
     */
    setPivotChartReference(reference: {
        unitId: string;
        subUnitId: string;
        pivotChartId: string;
    }): this;
    /**
     * Stores the detached view name, not its caption or shared source/cache.
     * Names must be nonempty and unique across Workbook Slicers/Timelines (case-insensitive).
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {string} name Nonempty Workbook-unique view name (case-insensitive).
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setName("Sales filter");
     * ```
     */
    setName(name: string): this;
    /**
     * Stores the detached view caption, not its name or shared source/cache.
     * The caption must be nonempty and at most 32767 characters.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {string} caption Nonempty caption, at most 32767 characters; independent of name.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setCaption("Sales");
     * ```
     */
    setCaption(caption: string): this;
    /**
     * Stores detached style override to an available Workbook builtin/custom style name.
     * Use clearStyle to restore the document default; source/cache/filter are unchanged.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {string} style Available Workbook builtin/custom style name.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setStyle(styleNames[0]);
     * ```
     */
    setStyle(style: string): this;
    /**
     * Stores an own undefined style override in detached settings; insert/update restores the document default.
     * Does not execute a command or change shared cache/filtering.
     *
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.clearStyle();
     * ```
     */
    clearStyle(): this;
    /**
     * Stores detached button column count to an integer in [1, 20000], without changing shared filtering.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {number} count Integer button column count in [1, 20000].
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setColumnCount(2);
     * ```
     */
    setColumnCount(count: number): this;
    /**
     * Stores detached item row height in finite positive CSS px, without changing shared filtering.
     * On insert/update, persists Math.round(height * 9525) as a positive unsigned integer EMU (at most 4294967295); reads divide by 9525.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {number} height Finite positive CSS px height (rowHeight converts to rounded EMU).
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setRowHeight(24);
     * ```
     */
    setRowHeight(height: number): this;
    /**
     * Stores detached caption visibility without changing its caption or shared filtering.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {boolean} visible Whether this per-view element is visible.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setShowCaption(true);
     * ```
     */
    setShowCaption(visible: boolean): this;
    /**
     * Stores detached persisted position-lock flag, not a shared filter or transient gesture state.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {boolean} locked Persisted per-view position-lock flag.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setLockedPosition(true);
     * ```
     */
    setLockedPosition(locked: boolean): this;
    /**
     * Stores detached zero-based visible member offset to an unsigned integer [0, 4294967295].
     * This is navigation, not member identity or shared filter selection.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {number} index Zero-based order/member offset as described above.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setStartItem(0);
     * ```
     */
    setStartItem(index: number): this;
    /**
     * Stores an A1 or zero-based row/column anchor with CSS px offsets, clearing detached absolute position.
     * No command runs; placement is validated on insert/update.
     *
     * @param {SheetSlicerAnchorSpec} anchor A1 cell or zero-based row/column anchor with CSS px offsets.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setPosition("J2");
     * ```
     */
    setPosition(anchor: SheetSlicerAnchorSpec): this;
    /**
     * Stores finite absolute Worksheet CSS px coordinates, clearing the detached anchor.
     * No command runs; placement is validated on insert/update.
     *
     * @param {number} x Finite absolute horizontal CSS px coordinate.
     * @param {number} y Finite absolute vertical CSS px coordinate.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setAbsolutePosition(100, 80);
     * ```
     */
    setAbsolutePosition(x: number, y: number): this;
    /**
     * Stores finite positive CSS px size in detached configuration without executing a command.
     * Insert/update validates it; omitted insertion sizes default to 220 x 280 (Slicer) or 420 x 140 (Timeline).
     *
     * @param {number} width Finite positive width in CSS px.
     * @param {number} height Finite positive height in CSS px.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetSlicerBuilder.build}
     * @example
     * ```ts
     * builder.setSize(220, 280);
     * ```
     */
    setSize(width: number, height: number): this;
    /**
     * Returns defensive insert/update information without executing any command or copying runtime filtering.
     * Requires a resolved source. Insertion validates names/style/placement at command execution; omitted names are generated
     * uniquely then, and current live names remain valid on update.
     *
     * @returns {ISheetSlicerInfo} A defensive current value (where applicable), with missing-resource behavior described above.
     * @throws If required source/host data is unavailable, input is unsupported, or the documented query/command fails.
     * @see {@link FWorksheet.insertSlicer}
     * @example
     * ```ts
     * const info = builder.build();
     * ```
     */
    build(): ISheetSlicerInfo;
}
export {};
