import type { FSheetPivotChart } from '@univerjs-pro/sheets-pivot-chart/facade';
import type { FPivotTable } from '@univerjs-pro/sheets-pivot/facade';
import type { ISheetTimelineInfo, SheetSlicerAnchorSpec } from '@univerjs-pro/sheets-slicer';
import { TimelineLevel } from '@univerjs-pro/slicer';
type SourceSetter = 'setPivotTable' | 'setPivotTableReference' | 'setPivotChart' | 'setPivotChartReference';
/** Source-locked and fluent even after chaining. */
export type FLinkedSheetTimelineBuilder = {
    [K in keyof Omit<FSheetTimelineBuilder, SourceSetter>]: FSheetTimelineBuilder[K] extends (...args: infer TArgs) => infer TResult ? TResult extends FSheetTimelineBuilder ? (...args: TArgs) => FLinkedSheetTimelineBuilder : FSheetTimelineBuilder[K] : FSheetTimelineBuilder[K];
};
/** Configuration copy from a live facade, with its source permanently locked. */
export type FBoundSheetTimelineBuilder = FLinkedSheetTimelineBuilder;
/**
 * Detached Timeline configuration for a supported original Pivot date field; visual dimensions use CSS px.
 * Setters/build do not run commands. Date navigation uses Workbook Excel serials, not JavaScript Date.
 * @hideconstructor
 */
export declare class FSheetTimelineBuilder {
    private readonly _unitId;
    private readonly _fieldId;
    private readonly _resolveSource;
    private readonly _locked;
    private _info;
    /**
     * 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.
     * Only supported original Pivot date fields are accepted, not Table/text/calculated/grouped sources.
     *
     * @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 FSheetTimelineBuilder.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.
     * Only supported original Pivot date fields are accepted, not Table/text/calculated/grouped sources.
     *
     * @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 FSheetTimelineBuilder.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.
     * Only supported original Pivot date fields are accepted, not Table/text/calculated/grouped sources.
     *
     * @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 FSheetTimelineBuilder.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.
     * Only supported original Pivot date fields are accepted, not Table/text/calculated/grouped sources.
     *
     * @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 FSheetTimelineBuilder.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 FSheetTimelineBuilder.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 FSheetTimelineBuilder.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 FSheetTimelineBuilder.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 FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.clearStyle();
     * ```
     */
    clearStyle(): this;
    /**
     * Stores detached display grain using TimelineLevel; shared date range and selectionLevel stay unchanged.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {TimelineLevel} level Owner TimelineLevel value for this per-view grain.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.setLevel(univerAPI.Enum.TimelineLevel.Month);
     * ```
     */
    setLevel(level: TimelineLevel): this;
    /**
     * Stores detached selection grain using TimelineLevel; display level and shared date range stay unchanged.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {TimelineLevel} level Owner TimelineLevel value for this per-view grain.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.setSelectionLevel(univerAPI.Enum.TimelineLevel.Day);
     * ```
     */
    setSelectionLevel(level: TimelineLevel): this;
    /**
     * Stores detached navigation position to a finite Excel serial in the Workbook date system.
     * Fractional serials are allowed; this is NOT an item index, CSS px or a filter range.
     * Only this detached configuration changes; no command or model write runs. Validation occurs on insert/update.
     *
     * @param {number} position Finite Excel serial navigation position, including fractional values.
     * @returns {this} This detached Builder for chaining; no command has run.
     * @see {@link FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.setScrollPosition(44927.5);
     * ```
     */
    setScrollPosition(position: number): this;
    /**
     * Stores detached header visibility without changing 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 FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.setShowHeader(true);
     * ```
     */
    setShowHeader(visible: boolean): this;
    /**
     * Stores detached selection-label visibility without changing 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 FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.setShowSelectionLabel(true);
     * ```
     */
    setShowSelectionLabel(visible: boolean): this;
    /**
     * Stores detached grain-control visibility without changing 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 FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.setShowTimeLevel(true);
     * ```
     */
    setShowTimeLevel(visible: boolean): this;
    /**
     * Stores detached scrollbar visibility without changing 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 FSheetTimelineBuilder.build}
     * @example
     * ```ts
     * builder.setShowHorizontalScrollbar(true);
     * ```
     */
    setShowHorizontalScrollbar(visible: boolean): 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 FSheetTimelineBuilder.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 FSheetTimelineBuilder.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 FSheetTimelineBuilder.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 {ISheetTimelineInfo} 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.insertTimeline}
     * @example
     * ```ts
     * const info = builder.build();
     * ```
     */
    build(): ISheetTimelineInfo;
}
export {};
