/**
 * Copyright (c) 2025 Huawei Technologies Co., Ltd.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import mustache from 'mustache';

const TEMPLATE = `
{
  "app": {
    "bundleName": "{{bundleName}}",
    "vendor": "example",
    "versionCode": 1000000,
    "versionName": "1.0.0",
    "icon": "$media:app_icon",
    "label": "$string:app_name",
  }
}
`;

export class AppScopeAppJSON5Template {
  constructor(private bundleName: string) {}

  build(): string {
    return mustache.render(TEMPLATE.trimStart(), {
      bundleName: this.bundleName,
    });
  }
}