import type { IDocumentNote, IEndnoteSettings, IFootnoteSettings } from '@univerjs/core';
import { FDocument } from '@univerjs/docs/facade';
export interface IFDocumentReferenceMixin {
    /**
     * Inserts a traditional-document footnote at a UTF-16 body offset and selects its content.
     * The reference and rich content share one undo/collaboration mutation. Returns null
     * for a modern document, an invalid position/content, or insufficient edit permission.
     * @param {number} offset Position in the main body, including structural tokens.
     * @param {Partial<Omit<IDocumentNote, 'noteId' | 'type'>>} content Optional paragraphs, inline drawings, tables and custom mark.
     * @returns {string | null} Stable segment id, usable with getTextRange and getParagraphs.
     * @example
     * ```ts
     * const document = univerAPI.getActiveDocument();
     * const id = document?.insertFootnote(5, {
     *   body: { dataStream: 'Source details\r\n', paragraphs: [{ startIndex: 14 }] },
     * });
     * if (id) console.log(document.getParagraphs(id));
     * ```
     */
    insertFootnote(offset: number, content?: Partial<Omit<IDocumentNote, 'noteId' | 'type'>>): string | null;
    /**
     * Returns detached note data in reference order. Automatic labels depend on layout
     * when numbering restarts on each page; the persisted segment id remains stable.
     * @returns {IDocumentNote[]} Notes referenced by the main body.
     * @example
     * ```ts
     * console.log(univerAPI.getActiveDocument()?.getFootnotes());
     * ```
     */
    getFootnotes(): IDocumentNote[];
    /**
     * Removes a footnote together with its body reference. Supports undo and collaboration.
     * @param {string} noteId Stable segment id returned by insertFootnote or getFootnotes.
     * @returns {boolean} Whether the deletion was applied.
     * @example
     * ```ts
     * const document = univerAPI.getActiveDocument();
     * const note = document?.getFootnotes()[0];
     * if (note) document.deleteFootnote(note.noteId);
     * ```
     */
    deleteFootnote(noteId: string): boolean;
    /**
     * Reads explicit document defaults or a section override, without expanding inherited values.
     * @param {string} sectionId Optional stable section id.
     * @returns {IFootnoteSettings | undefined} Detached explicit settings, or undefined if absent.
     * @example
     * ```ts
     * console.log(univerAPI.getActiveDocument()?.getFootnoteSettings());
     * ```
     */
    getFootnoteSettings(sectionId?: string): IFootnoteSettings | undefined;
    /**
     * Replaces explicit footnote settings; null restores inherited defaults. Section overrides
     * support position, columns and numbering. Separator bodies belong to document defaults.
     * @param {IFootnoteSettings | null} settings Replacement settings or null to reset.
     * @param {string} sectionId Optional stable section id.
     * @returns {boolean} Whether the settings changed.
     * @example
     * ```ts
     * univerAPI.getActiveDocument()?.setFootnoteSettings({
     *   position: 'pageBottom', columnCount: 2, numberFormat: 'decimal',
     *   startNumber: 1, restart: 'eachSect',
     * });
     * ```
     */
    setFootnoteSettings(settings: IFootnoteSettings | null, sectionId?: string): boolean;
    /**
     * Inserts an endnote with its body reference as one undoable change.
     * @param {number} offset UTF-16 body offset.
     * @param {Partial<Omit<IDocumentNote, 'noteId' | 'type'>>} content Optional rich content and custom mark.
     * @returns {string | null} Stable note segment id, or null when insertion is rejected.
     * @example
     * ```ts
     * const id = univerAPI.getActiveDocument()?.insertEndnote(5);
     * ```
     */
    insertEndnote(offset: number, content?: Partial<Omit<IDocumentNote, 'noteId' | 'type'>>): string | null;
    /**
     * Returns detached endnotes in body reference order.
     * @returns {IDocumentNote[]} Endnote data.
     * @example
     * ```ts
     * console.log(univerAPI.getActiveDocument()?.getEndnotes());
     * ```
     */
    getEndnotes(): IDocumentNote[];
    /**
     * Removes an endnote and its body reference; supports undo and collaboration.
     * @param {string} noteId Stable endnote segment id.
     * @returns {boolean} Whether deletion succeeded.
     * @example
     * ```ts
     * const document = univerAPI.getActiveDocument();
     * const note = document?.getEndnotes()[0];
     * if (note) document.deleteEndnote(note.noteId);
     * ```
     */
    deleteEndnote(noteId: string): boolean;
    /**
     * Returns explicit document settings or section overrides.
     * @param {string} sectionId Optional section id.
     * @returns {IEndnoteSettings | undefined} Detached explicit settings.
     * @example
     * ```ts
     * console.log(univerAPI.getActiveDocument()?.getEndnoteSettings());
     * ```
     */
    getEndnoteSettings(sectionId?: string): IEndnoteSettings | undefined;
    /**
     * Replaces endnote settings; null restores inherited defaults.
     * @param {IEndnoteSettings | null} settings Endnote settings or null.
     * @param {string} sectionId Optional section id.
     * @returns {boolean} Whether settings changed.
     * @example
     * ```ts
     * univerAPI.getActiveDocument()?.setEndnoteSettings({ position: 'sectEnd', restart: 'eachSect' });
     * ```
     */
    setEndnoteSettings(settings: IEndnoteSettings | null, sectionId?: string): boolean;
}
export declare class FDocumentReferenceMixin extends FDocument implements IFDocumentReferenceMixin {
    insertFootnote(offset: number, content?: Partial<Omit<IDocumentNote, 'noteId' | 'type'>>): string | null;
    getFootnotes(): IDocumentNote[];
    deleteFootnote(noteId: string): boolean;
    getFootnoteSettings(sectionId?: string): IFootnoteSettings | undefined;
    setFootnoteSettings(settings: IFootnoteSettings | null, sectionId?: string): boolean;
    insertEndnote(offset: number, content?: Partial<Omit<IDocumentNote, 'noteId' | 'type'>>): string | null;
    getEndnotes(): IDocumentNote[];
    deleteEndnote(noteId: string): boolean;
    getEndnoteSettings(sectionId?: string): IEndnoteSettings | undefined;
    setEndnoteSettings(settings: IEndnoteSettings | null, sectionId?: string): boolean;
}
declare module '@univerjs/docs/facade' {
    interface FDocument extends IFDocumentReferenceMixin {
    }
}
