"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PROVIDER_CREDENTIAL_SCHEMAS = void 0;
exports.getCredentialSchema = getCredentialSchema;
exports.isCompoundProvider = isCompoundProvider;
exports.PROVIDER_CREDENTIAL_SCHEMAS = {
    hetzner: {
        provider: 'hetzner',
        type: 'api_key',
        fields: [
            {
                key: 'apiKey',
                label: 'Hetzner API Token',
                hint: 'Hetzner Cloud Console → Security → API Tokens',
                secret: true,
                required: true,
            },
        ],
    },
    scaleway: {
        provider: 'scaleway',
        type: 'access_key_secret',
        fields: [
            {
                key: 'accessKey',
                label: 'Access Key ID',
                hint: 'Scaleway Console → IAM → API Keys → Access Key ID',
                secret: false,
                required: true,
            },
            {
                key: 'secretKey',
                label: 'Secret Key',
                hint: 'Scaleway Console → IAM → API Keys → Secret Key (shown once at creation)',
                secret: true,
                required: true,
            },
        ],
    },
};
function getCredentialSchema(provider) {
    const key = provider.toLowerCase();
    return exports.PROVIDER_CREDENTIAL_SCHEMAS[key] ?? null;
}
function isCompoundProvider(provider) {
    const schema = getCredentialSchema(provider);
    return schema?.type === 'access_key_secret';
}
