/**
 * A fluent builder to register contextual bindings with the
 * container.
 */
export class ContextBindingsBuilder {
    /**
     * The parent for whom to define the contextual
     * binding
     */
    #parent;
    /**
     * The binding the parent asks for
     */
    #binding;
    /**
     * Container instance for registering the contextual
     * bindings
     */
    #container;
    constructor(parent, container) {
        this.#parent = parent;
        this.#container = container;
    }
    /**
     * Specify the binding for which to register a custom
     * resolver.
     */
    asksFor(binding) {
        this.#binding = binding;
        return this;
    }
    /**
     * Provide a resolver to resolve the parent dependency
     */
    provide(resolver) {
        if (!this.#binding) {
            throw new Error('Missing value for contextual binding. Call "asksFor" method before calling the "provide" method');
        }
        this.#container.contextualBinding(this.#parent, this.#binding, resolver);
    }
}
//# sourceMappingURL=contextual_bindings_builder.js.map