/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import type { Model } from "#models/Model.js";
import type { ClassSemantics } from "./ClassSemantics.js";
/**
 * Base class for Matter semantics associated with JavaScript classes and properties.
 *
 * We model semantics using {@link Model}.  The model may be built declaratively with decorators or programmatically
 * using this interface directly.
 */
export declare abstract class Semantics {
    #private;
    /**
     * Determine whether these semantics are final.
     *
     * Once final no further mutation is allowed.
     */
    get isFinal(): boolean;
    /**
     * Finalize the model.
     */
    finalize(): void;
    /**
     * The {@link Model} defined by local decoration, if any.
     */
    get localModel(): Model<import("../../index.js").BaseElement, Model<import("../../index.js").BaseElement, any>> | undefined;
    /**
     * Set the model.
     *
     * When "setting" the model we need to merge semantics coming from decorators, the prototype hierarchy, and models
     * provided programmatically.
     *
     * This may set the local model, change it or set its operational base.  We use local state and the finalization
     * status of the model to determine how to integrate.
     */
    set mutableModel(model: Model);
    /**
     * Replace the "base" of {@link localModel} and return an updated model.
     */
    protected abstract integrateModel(model: Model): Model;
    /**
     * Obtain a model unconditionally for mutation purposes.
     */
    get mutableModel(): Model;
    /**
     * The model's {@link Model.Type}.
     *
     * Field decorators operate prior to class decorators, so we may need to transition the model to a new type when the
     * class is decorated.  This is slightly lossy so type-specific decoration should always occur after assigning kind.
     */
    get modelType(): Model.Type | undefined;
    set modelType(type: Model.ConcreteType);
    protected abstract createModel(type?: Model.ConcreteType): Model;
}
export declare namespace Semantics {
    /**
     * Access the {@link Semantics} of a {@link DecoratorContext}.
     */
    function of(context: DecoratorContext): import("./FieldSemantics.js").FieldSemantics | ClassSemantics;
    /**
     * Access the {@link ClassSemantics} of a constructor or decorator context.
     */
    let classOf: (_source: ClassSemantics.Source) => ClassSemantics;
}
//# sourceMappingURL=Semantics.d.ts.map