{"version":3,"sources":["../../src/sections/environment-variables.ts"],"sourcesContent":["import { type ListOptions, ListSection } from './list-section.js';\nimport { heading } from '../elements/heading.js';\n\ninterface EnvironmentVariable {\n  name: string;\n  defaultValue?: string;\n}\n\nexport interface EnvironmentVariablesOptions\n  extends Partial<ListOptions<EnvironmentVariable>> {}\n\nexport class EnvironmentVariables extends ListSection<EnvironmentVariable> {\n  constructor(options?: EnvironmentVariablesOptions) {\n    super({\n      title: options?.title ?? 'Environment Variables',\n      type: 'None',\n      ...options,\n    });\n  }\n\n  protected itemMapper(item: EnvironmentVariable): string {\n    return `${item.name}=${item.defaultValue ?? ''}`;\n  }\n\n  protected synthesizeContent(): string[] {\n    return [\n      heading(this.headingLevel, this.title),\n      '',\n      `To run this project, you will need to add the following environment variables to your .env file`,\n      ...(this.items.length\n        ? ['', '```bash', this.items.map(this.itemMapper).join('\\n'), '```']\n        : []),\n    ];\n  }\n}\n\nexport function environmentVariablesSection(\n  options?: EnvironmentVariablesOptions,\n) {\n  return new EnvironmentVariables(options);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA8C;AAC9C,qBAAwB;AAUjB,MAAM,6BAA6B,gCAAiC;AAAA,EACzE,YAAY,SAAuC;AACjD,UAAM;AAAA,MACJ,OAAO,SAAS,SAAS;AAAA,MACzB,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEU,WAAW,MAAmC;AACtD,WAAO,GAAG,KAAK,IAAI,IAAI,KAAK,gBAAgB,EAAE;AAAA,EAChD;AAAA,EAEU,oBAA8B;AACtC,WAAO;AAAA,UACL,wBAAQ,KAAK,cAAc,KAAK,KAAK;AAAA,MACrC;AAAA,MACA;AAAA,MACA,GAAI,KAAK,MAAM,SACX,CAAC,IAAI,WAAW,KAAK,MAAM,IAAI,KAAK,UAAU,EAAE,KAAK,IAAI,GAAG,KAAK,IACjE,CAAC;AAAA,IACP;AAAA,EACF;AACF;AAEO,SAAS,4BACd,SACA;AACA,SAAO,IAAI,qBAAqB,OAAO;AACzC;","names":[]}