import type { PackageManifest, PackageContent } from './types'

export function generateReadme(manifest: PackageManifest, content: PackageContent): string {
  return `# ${manifest.name}

Version: ${manifest.version}
Author: ${manifest.author}
Category: ${manifest.category}

## Description

${manifest.description}

## Contents

- **Schemas**: ${content.schemas?.length || 0} data models
- **Pages**: ${content.pages?.length || 0} page configurations
- **Workflows**: ${content.workflows?.length || 0} workflows
- **Lua Scripts**: ${content.luaScripts?.length || 0} scripts
- **Components**: ${Object.keys(content.componentHierarchy || {}).length} component hierarchies
- **CSS Classes**: ${content.cssClasses?.length || 0} CSS categories
- **Dropdown Configs**: ${content.dropdownConfigs?.length || 0} dropdown configurations

## Tags

${manifest.tags.join(', ')}

## Installation

Import this package through the MetaBuilder Package Manager.

## Dependencies

${manifest.dependencies.length > 0 ? manifest.dependencies.join(', ') : 'None'}

---

Generated by MetaBuilder Package Exporter
`
}
