/** @packageDocumentation
 * @module Elements
 */
import { AnnotationTextStyleProps, Code, CodeProps, CodeScopeProps, Placement2dProps, Placement3dProps, TextAnnotation, TextAnnotation2dProps, TextAnnotation3dProps, TextAnnotationProps, TextStyleSettings, TextStyleSettingsProps } from "@itwin/core-common";
import { IModelDb } from "../IModelDb";
import { AnnotationElement2d, DefinitionElement, GraphicalElement3d, OnElementIdArg, OnElementPropsArg } from "../Element";
import { Id64String } from "@itwin/core-bentley";
import { TextAnnotationUsesTextStyleByDefault, TextBlockAndId } from "./ElementDrivesTextAnnotation";
import { CustomHandledProperty, DeserializeEntityArgs, ECSqlRow } from "../Entity";
/** The version of the JSON stored in `TextAnnotation2d/3dProps.textAnnotationData` used by the code.
 * Uses the same semantics as [ECVersion]($ecschema-metadata).
 * @internal
*/
export declare const TEXT_ANNOTATION_JSON_VERSION = "1.0.0";
/** Arguments supplied when creating a [[TextAnnotation2d]].
 * @beta
 */
export interface TextAnnotation2dCreateArgs {
    /** The category ID for the annotation. */
    category: Id64String;
    /** The model ID where the annotation will be placed. */
    model: Id64String;
    /** The placement properties for the annotation. */
    placement: Placement2dProps;
    /** The default text style ID for the annotation. */
    defaultTextStyleId?: Id64String;
    /** Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation2d`. Essentially an empty element if not provided. */
    textAnnotationProps?: TextAnnotationProps;
    /** Optional code for the element. */
    code?: CodeProps;
}
/** Arguments supplied when creating a [[TextAnnotation3d]].
 * @beta
 */
export interface TextAnnotation3dCreateArgs {
    /** The category ID for the annotation. */
    category: Id64String;
    /** The model ID where the annotation will be placed. */
    model: Id64String;
    /** The placement properties for the annotation. */
    placement: Placement3dProps;
    /** The default text style ID for the annotation. */
    defaultTextStyleId?: Id64String;
    /** Optional [[TextAnnotation]] JSON representation used to create the `TextAnnotation3d`. Essentially an empty element if not provided. */
    textAnnotationProps?: TextAnnotationProps;
    /** Optional code for the element. */
    code?: CodeProps;
}
/** An element that displays textual content within a 2d model.
 * The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.
 * @see [[setAnnotation]] to change the textual content.
 * @public @preview
 */
export declare class TextAnnotation2d extends AnnotationElement2d {
    /** @internal */
    static get className(): string;
    /**
     * The default [[AnnotationTextStyle]] used by the TextAnnotation2d.
     * @beta
     */
    defaultTextStyle?: TextAnnotationUsesTextStyleByDefault;
    /** The data associated with the text annotation. */
    private _textAnnotationProps?;
    /** Extract the textual content, if present.
     * @see [[setAnnotation]] to change it.
     */
    getAnnotation(): TextAnnotation | undefined;
    /** Change the textual content of the `TextAnnotation2d`.
     * @see [[getAnnotation]] to extract the current annotation.
     * @param annotation The new annotation
     */
    setAnnotation(annotation: TextAnnotation): void;
    protected constructor(props: TextAnnotation2dProps, iModel: IModelDb);
    /** Creates a new instance of `TextAnnotation2d` from its JSON representation. */
    static fromJSON(props: TextAnnotation2dProps, iModel: IModelDb): TextAnnotation2d;
    /**
     * Converts the current `TextAnnotation2d` instance to its JSON representation.
     * It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.
     * @inheritdoc
     */
    toJSON(): TextAnnotation2dProps;
    /** Creates a new `TextAnnotation2d` instance with the specified properties.
     * @param iModelDb The iModel.
     * @param arg The arguments for creating the TextAnnotation2d.
     * @beta
     */
    static create(iModelDb: IModelDb, arg: TextAnnotation2dCreateArgs): TextAnnotation2d;
    /**
     * Updates the geometry of the TextAnnotation2d on insert and validates version.
     * @inheritdoc
     * @beta
     */
    protected static onInsert(arg: OnElementPropsArg): void;
    /**
     * Updates the geometry of the TextAnnotation2d on update and validates version.
     * @inheritdoc
     * @beta
     */
    protected static onUpdate(arg: OnElementPropsArg): void;
    /**
     * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation2dProps]($common).
     * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
     * Also, validates the version of the text annotation data and migrates it if necessary.
     * @beta
     */
    protected static validateVersionAndUpdateGeometry(arg: OnElementPropsArg): void;
    /**
     * TextAnnotation2d custom HandledProps include 'textAnnotationData'.
     * @inheritdoc
     * @internal
     */
    protected static readonly _customHandledProps: CustomHandledProperty[];
    /**
     * TextAnnotation2d deserializes 'textAnnotationData'.
     * @inheritdoc
     * @beta
     */
    static deserialize(props: DeserializeEntityArgs): TextAnnotation2dProps;
    /**
     * TextAnnotation2d serializes 'textAnnotationData'.
     * @inheritdoc
     * @beta
     */
    static serialize(props: TextAnnotation2dProps, iModel: IModelDb): ECSqlRow;
    /** @internal */
    getTextBlocks(): Iterable<TextBlockAndId>;
    /** @internal */
    updateTextBlocks(textBlocks: TextBlockAndId[]): void;
    /** @internal */
    static onInserted(arg: OnElementIdArg): void;
    /** @internal */
    static onUpdated(arg: OnElementIdArg): void;
}
/** An element that displays textual content within a 3d model.
 * The text is stored as a [TextAnnotation]($common) from which the element's [geometry]($docs/learning/common/GeometryStream.md) and [Placement]($common) are computed.
 * @see [[setAnnotation]] to change the textual content.
 * @public @preview
 */
export declare class TextAnnotation3d extends GraphicalElement3d {
    /** @internal */
    static get className(): string;
    /**
     * The default [[AnnotationTextStyle]] used by the TextAnnotation3d.
     * @beta
     */
    defaultTextStyle?: TextAnnotationUsesTextStyleByDefault;
    /** The data associated with the text annotation. */
    private _textAnnotationProps?;
    /** Extract the textual content, if present.
     * @see [[setAnnotation]] to change it.
     */
    getAnnotation(): TextAnnotation | undefined;
    /** Change the textual content of the `TextAnnotation3d`.
     * @see [[getAnnotation]] to extract the current annotation.
     * @param annotation The new annotation
     */
    setAnnotation(annotation: TextAnnotation): void;
    protected constructor(props: TextAnnotation3dProps, iModel: IModelDb);
    /** Creates a new instance of `TextAnnotation3d` from its JSON representation. */
    static fromJSON(props: TextAnnotation3dProps, iModel: IModelDb): TextAnnotation3d;
    /**
     * Converts the current `TextAnnotation3d` instance to its JSON representation.
     * It also computes the `elementGeometryBuilderParams` property used to create the GeometryStream.
     * @inheritdoc
     */
    toJSON(): TextAnnotation3dProps;
    /** Creates a new `TextAnnotation3d` instance with the specified properties.
     * @param iModelDb The iModel.
     * @param arg The arguments for creating the TextAnnotation3d.
     * @beta
     */
    static create(iModelDb: IModelDb, arg: TextAnnotation3dCreateArgs): TextAnnotation3d;
    /**
     * Updates the geometry of the TextAnnotation3d on insert and validates version..
     * @inheritdoc
     * @beta
     */
    protected static onInsert(arg: OnElementPropsArg): void;
    /**
     * Updates the geometry of the TextAnnotation3d on update and validates version..
     * @inheritdoc
     * @beta
     */
    protected static onUpdate(arg: OnElementPropsArg): void;
    /**
     * Populates the `elementGeometryBuilderParams` property in the [TextAnnotation3dProps]($common).
     * Only does this if the `elementGeometryBuilderParams` is not already set and if there is actually a text annotation to produce geometry for.
     * Also, validates the version of the text annotation data and migrates it if necessary.
     * @beta
     */
    protected static validateVersionAndUpdateGeometry(arg: OnElementPropsArg): void;
    /**
     * TextAnnotation3d custom HandledProps include 'textAnnotationData'.
     * @inheritdoc
     * @internal
     */
    protected static readonly _customHandledProps: CustomHandledProperty[];
    /**
     * TextAnnotation3d deserializes 'textAnnotationData'.
     * @inheritdoc
     * @beta
     */
    static deserialize(props: DeserializeEntityArgs): TextAnnotation3dProps;
    /**
     * TextAnnotation3d serializes 'textAnnotationData'.
     * @inheritdoc
     * @beta
     */
    static serialize(props: TextAnnotation3dProps, iModel: IModelDb): ECSqlRow;
    /** @internal */
    getTextBlocks(): Iterable<TextBlockAndId>;
    /** @internal */
    updateTextBlocks(textBlocks: TextBlockAndId[]): void;
    /** @internal */
    static onInserted(arg: OnElementIdArg): void;
    /** @internal */
    static onUpdated(arg: OnElementIdArg): void;
}
/** The version of the JSON stored in `AnnotationTextStyleProps.settings` used by the code.
 * Uses the same semantics as [ECVersion]($ecschema-metadata).
 * @internal
*/
export declare const TEXT_STYLE_SETTINGS_JSON_VERSION = "1.0.0";
/** Arguments supplied when creating an [[AnnotationTextStyle]].
 * @beta
 */
export interface TextStyleCreateArgs {
    /** The ID of the [[DefinitionModel]]. */
    definitionModelId: Id64String;
    /** The name to assign to the [[AnnotationTextStyle]]. */
    name: string;
    /** Optional text style settings used to create the [[AnnotationTextStyle]]. Default settings will be used if not provided. */
    settings?: TextStyleSettingsProps;
    /** Optional description for the [[AnnotationTextStyle]]. */
    description?: string;
}
/**
 * The definition element that holds text style information.
 * The style is stored as a [TextStyleSettings]($common).
 * @beta
 */
export declare class AnnotationTextStyle extends DefinitionElement {
    /** @internal */
    static get className(): string;
    /**
     * Optional text describing the `AnnotationTextStyle`.
     */
    description?: string;
    /**
     * The text style settings for the `AnnotationTextStyle`.
     * @see [[TextStyleSettings]] for more information.
     */
    settings: TextStyleSettings;
    protected constructor(props: AnnotationTextStyleProps, iModel: IModelDb);
    /**
     * Creates a Code for an `AnnotationTextStyle` given a name that is meant to be unique within the scope of the specified DefinitionModel.
     *
     * @param iModel - The IModelDb.
     * @param definitionModelId - The ID of the DefinitionModel that contains the AnnotationTextStyle and provides the scope for its name.
     * @param name - The AnnotationTextStyle name.
     * @beta
     */
    static createCode(iModel: IModelDb, definitionModelId: CodeScopeProps, name: string): Code;
    /**
     * Creates a new instance of `AnnotationTextStyle` with the specified properties.
     *
     * @param iModelDb - The iModelDb.
     * @param arg - The arguments for creating the AnnotationTextStyle.
     * @beta
     */
    static create(iModelDb: IModelDb, arg: TextStyleCreateArgs): AnnotationTextStyle;
    /**
     * Converts the current `AnnotationTextStyle` instance to its JSON representation.
     * @inheritdoc
     */
    toJSON(): AnnotationTextStyleProps;
    /** Creates a new instance of `AnnotationTextStyle` from its JSON representation. */
    static fromJSON(props: AnnotationTextStyleProps, iModel: IModelDb): AnnotationTextStyle;
    /**
     * Validates that the AnnotationTextStyle's settings are valid before insert.
     * @inheritdoc
     * @beta
     */
    protected static onInsert(arg: OnElementPropsArg): void;
    /**
     * Validates that the AnnotationTextStyle's settings are valid before update.
     * @inheritdoc
     * @beta
     */
    protected static onUpdate(arg: OnElementPropsArg): void;
    private static validateSettings;
    /**
     * AnnotationTextStyle custom HandledProps include 'settings'.
     * @inheritdoc
     * @beta
     */
    protected static readonly _customHandledProps: CustomHandledProperty[];
    /**
     * AnnotationTextStyle deserializes 'settings'.
     * @inheritdoc
     * @beta
     */
    static deserialize(props: DeserializeEntityArgs): AnnotationTextStyleProps;
    /**
     * AnnotationTextStyle serializes 'settings'.
     * @inheritdoc
     * @beta
     */
    static serialize(props: AnnotationTextStyleProps, iModel: IModelDb): ECSqlRow;
    /** Parses, validates, and potentially migrates the text style settings data from a JSON string. */
    private static parseTextStyleSettings;
}
//# sourceMappingURL=TextAnnotationElement.d.ts.map