import CheckpointTailWitnessLocator from "./CheckpointTailWitnessLocator.js";
import ContinuumEvidencePosture from "../../continuum/ContinuumEvidencePosture.js";
import NeighborhoodOptic from "./NeighborhoodOptic.js";
import NodeOptic from "./NodeOptic.js";
import Optic from "./Optic.js";
import OpticAperturePosture from "./OpticAperturePosture.js";
import OpticBasisPosture from "./OpticBasisPosture.js";
import OpticCoordinatePosture from "./OpticCoordinatePosture.js";
import OpticSupportRule from "./OpticSupportRule.js";
import TraversalOptic from "./TraversalOptic.js";
export default class WorldlineOptic {
    _locator;
    _posture;
    constructor(options) {
        this._locator = new CheckpointTailWitnessLocator({ source: options.source });
        this._posture = Object.freeze({
            coordinatePosture: options.coordinatePosture ?? OpticCoordinatePosture.liveOneOff(),
            aperturePosture: OpticAperturePosture.defaultFullRead(),
            basisPosture: OpticBasisPosture.checkpointTailBasisVerified(),
            evidencePosture: ContinuumEvidencePosture.translatedGitWarpEvidence(),
        });
        Object.freeze(this);
    }
    node(nodeId) {
        return new NodeOptic({
            optic: Optic.node({ ...this._posture, nodeId }),
            locator: this._locator,
        });
    }
    neighborhood(nodeId) {
        return new NeighborhoodOptic({
            optic: Optic.neighborhood({ ...this._posture, nodeId }),
            locator: this._locator,
        });
    }
    traversal(startNodeId) {
        return new TraversalOptic({
            optic: Optic.traversal({
                ...this._posture,
                startNodeId,
                supportRule: OpticSupportRule.globalDiscoveryRefused(),
            }),
            locator: this._locator,
        });
    }
}
