"use strict";
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateReadme = void 0;
const md_file_1 = require("../file-formats/md-file");
async function generateReadme(project) {
    const md = new md_file_1.MdFile(await project.state.readFile(project.readme) || '');
    let azureInfo = '';
    if (project.azure) {
        azureInfo = `
## Module Requirements
- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version ${project.accountsVersionMinimum} or greater

## Authentication
AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
`;
    }
    md.prepend('Generated', `# ${project.moduleName}
This directory contains the PowerShell module for the ${project.serviceName} service.

---
## Info
- Modifiable: yes
- Generated: all
- Committed: yes
- Packaged: yes

---
## Detail
This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
${azureInfo}
## Development
For information on how to develop for \`${project.moduleName}\`, see [how-to.md](how-to.md).`);
    md.trim();
    project.state.writeFile(project.readme, md.text, undefined, 'source-file-other');
}
exports.generateReadme = generateReadme;
//# sourceMappingURL=readme.js.map