//#region src/robots.ts
function buildRobotsTxt(input) {
	const lines = [];
	if (input.allowAll !== false) lines.push("User-agent: *", "Allow: /");
	else lines.push("User-agent: *", "Disallow: /");
	for (const path of input.disallowPaths ?? []) lines.push(`Disallow: ${path}`);
	lines.push(`Sitemap: ${input.sitemapUrl}`);
	return `${lines.join("\n")}\n`;
}
//#endregion
export { buildRobotsTxt };
