import { AnyLayer, LayerType } from "../../types";
/**
 * Interface representing a group of layers.
 */
export interface IGroup {
    /**
     * The unique identifier of the group.
     */
    id: string;
    /**
     * The type of the group, which is `Group`.
     */
    type: LayerType.Group;
    /**
     * The visibility of the group.
     */
    visible: boolean;
    /**
     * The z-index of the group, determining its stacking order.
     */
    zIndex: number;
    /**
     * The layers contained within the group.
     */
    layers: Array<AnyLayer>;
}
/**
 * Class representing a group of layers.
 */
export declare class Group implements IGroup {
    /**
     * The unique identifier of the group.
     */
    id: string;
    /**
     * The type of the group, which is `Group`.
     */
    type: LayerType.Group;
    /**
     * The visibility of the group.
     */
    visible: boolean;
    /**
     * The z-index of the group, determining its stacking order.
     */
    zIndex: number;
    /**
     * The layers contained within the group.
     */
    layers: Array<any>;
    /**
     * Constructs a new Group instance.
     * @param opts {Object} - Optional parameters for the group.
     * @param opts.id {string} - The unique identifier of the group.
     * @param opts.visible {boolean} - The visibility of the group.
     * @param opts.zIndex {number} - The z-index of the group.
     */
    constructor(opts?: {
        id?: string;
        visible?: boolean;
        zIndex?: number;
    });
    /**
     * Sets the ID of the group.
     * @param id {string} - The unique identifier of the group.
     * @returns {this} The current instance for chaining.
     */
    setID(id: string): this;
    /**
     * Sets the visibility of the group.
     * @param visible {boolean} - The visibility state of the group.
     * @returns {this} The current instance for chaining.
     */
    setVisible(visible: boolean): this;
    /**
     * Sets the z-index of the group.
     * @param zIndex {number} - The z-index value of the group.
     * @returns {this} The current instance for chaining.
     */
    setZIndex(zIndex: number): this;
    /**
     * Adds components to the group.
     * @param components {AnyLayer[]} - The components to add to the group.
     * @returns {this} The current instance for chaining.
     */
    add(...components: AnyLayer[]): this;
    /**
     * Removes a component from the group by its ID.
     * @param id {string} - The unique identifier of the component to remove.
     * @returns {this} The current instance for chaining.
     */
    remove(id: string): this;
    /**
     * Clears all components from the group.
     * @returns {this} The current instance for chaining.
     */
    clear(): this;
    /**
     * Retrieves a component from the group by its ID.
     * @param id {string} - The unique identifier of the component to retrieve.
     * @returns {AnyLayer | undefined} The component with the specified ID, or undefined if not found.
     */
    get(id: string): AnyLayer | undefined;
    /**
     * Retrieves all components from the group.
     * @returns {AnyLayer[]} An array of all components in the group.
     */
    getAll(): AnyLayer[];
    /**
     * Gets the number of components in the group.
     * @returns {number} The number of components in the group.
     */
    get length(): number;
    /**
     * Converts the group to a JSON representation.
     * @returns {IGroup} The JSON representation of the group.
     */
    toJSON(): IGroup;
}
