"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnsupportedProviderError = void 0;
exports.isUnsupportedProviderError = isUnsupportedProviderError;
const catalog_1 = require("../i18n/catalog");
class UnsupportedProviderError extends Error {
    providerType;
    kind;
    constructor(providerType, kind, locale = catalog_1.DEFAULT_APP_LOCALE) {
        super((0, catalog_1.translate)(locale, `provider.error.unsupported.${providerType}`, { kind }));
        this.providerType = providerType;
        this.kind = kind;
        this.name = "UnsupportedProviderError";
    }
}
exports.UnsupportedProviderError = UnsupportedProviderError;
function isUnsupportedProviderError(error) {
    return error instanceof UnsupportedProviderError;
}
