// SPDX-License-Identifier: Apache-2.0
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { K8Client } from './k8-client.js';
import { injectable } from 'tsyringe-neo';
let K8ClientFactory = class K8ClientFactory {
    k8Clients = new Map();
    getK8(context) {
        if (!this.k8Clients.has(context)) {
            this.k8Clients.set(context, this.createK8Client(context));
        }
        return this.k8Clients.get(context);
    }
    /**
     * Create a new k8Factory client for the given context
     * @param context - The context to create the k8Factory client for
     * @returns a new k8Factory client
     */
    createK8Client(context) {
        return new K8Client(context);
    }
    default() {
        return new K8Client(undefined);
    }
};
K8ClientFactory = __decorate([
    injectable()
], K8ClientFactory);
export { K8ClientFactory };
//# sourceMappingURL=k8-client-factory.js.map