import { UMB_VALIDATION_CONTEXT } from '../context/index.js';
import { UmbControllerBase } from '../../../../libs/class-api/index.js';
export class UmbValidationPathTranslatorBase extends UmbControllerBase {
    constructor(host, ctrlAlias) {
        super(host, ctrlAlias);
        this.consumeContext(UMB_VALIDATION_CONTEXT, (context) => {
            this._context?.removeTranslator(this);
            this._context = context;
            context?.addTranslator(this);
        });
    }
    hostDisconnected() {
        this._context?.removeTranslator(this);
        this._context = undefined;
        super.hostDisconnected();
    }
}
