/** Generate a security.txt file contents per RFC 9116. */
export function generateSecurityTxt(config) {
    const lines = [];
    lines.push(`Contact: ${config.contact}`);
    lines.push(`Expires: ${config.expires.toISOString()}`);
    if (config.encryption)
        lines.push(`Encryption: ${config.encryption}`);
    if (config.acknowledgments)
        lines.push(`Acknowledgments: ${config.acknowledgments}`);
    if (config.preferredLanguages?.length) {
        lines.push(`Preferred-Languages: ${config.preferredLanguages.join(', ')}`);
    }
    if (config.canonical)
        lines.push(`Canonical: ${config.canonical}`);
    if (config.policy)
        lines.push(`Policy: ${config.policy}`);
    return lines.join('\n') + '\n';
}
//# sourceMappingURL=security-txt.js.map