/**
 * Stable ID for the built-in DcRouter pseudo-provider. The Providers list
 * surfaces this as the first, non-deletable row so operators see a uniform
 * "who serves this?" answer for every domain. The ID is magic — it never
 * exists in the DnsProviderDoc collection; handlers inject it at read time
 * and reject any mutation that targets it.
 */
export const DCROUTER_BUILTIN_PROVIDER_ID = '__dcrouter__';
/**
 * Single source of truth for which DNS provider types exist and what
 * credentials each one needs. Used by both backend and frontend.
 */
export const dnsProviderTypeDescriptors = [
    {
        type: 'dcrouter',
        displayName: 'DcRouter (built-in)',
        description: 'Built-in authoritative DNS. Records are served directly by dcrouter — delegate the domain\'s NS records to make this effective.',
        credentialFields: [],
    },
    {
        type: 'cloudflare',
        displayName: 'Cloudflare',
        description: 'External DNS provider. The provider stays authoritative; dcrouter pushes record changes via its API.',
        credentialFields: [
            {
                key: 'apiToken',
                label: 'API Token',
                helpText: 'A Cloudflare API token with Zone:Read and DNS:Edit permissions for the target zones.',
                required: true,
                secret: true,
            },
        ],
    },
];
/**
 * Look up the descriptor for a given provider type.
 */
export function getDnsProviderTypeDescriptor(type) {
    return dnsProviderTypeDescriptors.find((d) => d.type === type);
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG5zLXByb3ZpZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHNfaW50ZXJmYWNlcy9kYXRhL2Rucy1wcm92aWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFDSCxNQUFNLENBQUMsTUFBTSw0QkFBNEIsR0FBRyxjQUFjLENBQUM7QUFpSTNEOzs7R0FHRztBQUNILE1BQU0sQ0FBQyxNQUFNLDBCQUEwQixHQUE4QztJQUNuRjtRQUNFLElBQUksRUFBRSxVQUFVO1FBQ2hCLFdBQVcsRUFBRSxxQkFBcUI7UUFDbEMsV0FBVyxFQUNULGlJQUFpSTtRQUNuSSxnQkFBZ0IsRUFBRSxFQUFFO0tBQ3JCO0lBQ0Q7UUFDRSxJQUFJLEVBQUUsWUFBWTtRQUNsQixXQUFXLEVBQUUsWUFBWTtRQUN6QixXQUFXLEVBQ1Qsc0dBQXNHO1FBQ3hHLGdCQUFnQixFQUFFO1lBQ2hCO2dCQUNFLEdBQUcsRUFBRSxVQUFVO2dCQUNmLEtBQUssRUFBRSxXQUFXO2dCQUNsQixRQUFRLEVBQ04sc0ZBQXNGO2dCQUN4RixRQUFRLEVBQUUsSUFBSTtnQkFDZCxNQUFNLEVBQUUsSUFBSTthQUNiO1NBQ0Y7S0FDRjtDQUNGLENBQUM7QUFFRjs7R0FFRztBQUNILE1BQU0sVUFBVSw0QkFBNEIsQ0FDMUMsSUFBc0I7SUFFdEIsT0FBTywwQkFBMEIsQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLEtBQUssSUFBSSxDQUFDLENBQUM7QUFDakUsQ0FBQyJ9