/**
 * Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info.
 *
 * @author Alexander Rose <alexander.rose@weirdbyte.de>
 */
import { RuntimeContext } from '../mol-task/index.js';
import { GraphicsRenderObject } from '../mol-gl/render-object.js';
import { PickingId } from '../mol-geo/geometry/picking.js';
import { Loci } from '../mol-model/loci.js';
import { MarkerAction, MarkerInfo } from '../mol-util/marker-action.js';
import { ParamDefinition as PD } from '../mol-util/param-definition.js';
import { WebGLContext } from '../mol-gl/webgl/context.js';
import { Theme } from '../mol-theme/theme.js';
import { Mat4 } from '../mol-math/linear-algebra.js';
import { Overpaint } from '../mol-theme/overpaint.js';
import { Interval } from '../mol-data/int/interval.js';
import { Transparency } from '../mol-theme/transparency.js';
import { Clipping } from '../mol-theme/clipping.js';
import { Geometry } from '../mol-geo/geometry/geometry.js';
import { Substance } from '../mol-theme/substance.js';
import { LocationCallback } from './util.js';
import { Emissive } from '../mol-theme/emissive.js';
export interface VisualContext {
    readonly runtime: RuntimeContext;
    readonly webgl?: WebGLContext;
}
export { Visual };
interface Visual<D, P extends PD.Params> {
    /** Number of addressable groups in all instances of the visual */
    readonly groupCount: number;
    readonly renderObject: GraphicsRenderObject | undefined;
    readonly geometryVersion: number;
    createOrUpdate: (ctx: VisualContext, theme: Theme, props: PD.Values<P>, data?: D) => Promise<void> | void;
    getLoci: (pickingId: PickingId) => Loci;
    eachLocation: (cb: LocationCallback) => void;
    mark: (loci: Loci, action: MarkerAction) => boolean;
    setVisibility: (visible: boolean) => void;
    setAlphaFactor: (alphaFactor: number) => void;
    setPickable: (pickable: boolean) => void;
    setColorOnly: (colorOnly: boolean) => void;
    setTransform: (matrix?: Mat4, instanceMatrices?: Float32Array | null) => void;
    setOverpaint: (overpaint: Overpaint, webgl?: WebGLContext) => void;
    setTransparency: (transparency: Transparency, webgl?: WebGLContext) => void;
    setEmissive: (emissive: Emissive, webgl?: WebGLContext) => void;
    setSubstance: (substance: Substance, webgl?: WebGLContext) => void;
    setClipping: (clipping: Clipping) => void;
    setThemeStrength: (strength: {
        overpaint: number;
        transparency: number;
        emissive: number;
        substance: number;
    }) => void;
    destroy: () => void;
    mustRecreate?: (data: D, props: PD.Values<P>, webgl?: WebGLContext) => boolean;
}
declare namespace Visual {
    export type LociApply = (loci: Loci, apply: (interval: Interval) => boolean, isMarking: boolean) => boolean;
    export function setVisibility(renderObject: GraphicsRenderObject | undefined, visible: boolean): void;
    export function setAlphaFactor(renderObject: GraphicsRenderObject | undefined, alphaFactor: number): void;
    export function setPickable(renderObject: GraphicsRenderObject | undefined, pickable: boolean): void;
    export function setColorOnly(renderObject: GraphicsRenderObject | undefined, colorOnly: boolean): void;
    export type PreviousMark = {
        loci: Loci;
        action: MarkerAction;
        status: MarkerInfo['status'];
    };
    export function mark(renderObject: GraphicsRenderObject | undefined, loci: Loci, action: MarkerAction, lociApply: LociApply, previous?: PreviousMark): boolean;
    type SmoothingContext = {
        geometry: Geometry;
        props: PD.Values<any>;
        webgl?: WebGLContext;
    };
    export function setOverpaint(renderObject: GraphicsRenderObject | undefined, overpaint: Overpaint, lociApply: LociApply, clear: boolean, smoothing?: SmoothingContext): void;
    export function setTransparency(renderObject: GraphicsRenderObject | undefined, transparency: Transparency, lociApply: LociApply, clear: boolean, smoothing?: SmoothingContext): void;
    export function setEmissive(renderObject: GraphicsRenderObject | undefined, emissive: Emissive, lociApply: LociApply, clear: boolean, smoothing?: SmoothingContext): void;
    export function setSubstance(renderObject: GraphicsRenderObject | undefined, substance: Substance, lociApply: LociApply, clear: boolean, smoothing?: SmoothingContext): void;
    export function setClipping(renderObject: GraphicsRenderObject | undefined, clipping: Clipping, lociApply: LociApply, clear: boolean): void;
    export function setThemeStrength(renderObject: GraphicsRenderObject | undefined, strength: {
        overpaint: number;
        transparency: number;
        emissive: number;
        substance: number;
    }): void;
    export function setTransform(renderObject: GraphicsRenderObject | undefined, transform?: Mat4, instanceTransforms?: Float32Array | null): void;
    export {};
}
