{{#if getNativeModules}}// native modules
{{#each getNativeModules}}const {{this}} = require('{{this}}');{{/each}}
{{/if}}{{#if get3rdPartyModules}}// 3rd party modules
{{#each get3rdPartyModules}}const {{this}} = require('{{this}}');
{{/each}}
{{/if}}{{#if getAppModules}}// application modules
{{#each getAppModules}}const {{this}} = require('{{this}}');{{/each}}
{{/if}}

/**
 * {{#if isInterface}}Interface {{/if}}Class {{getFullName}}{{#if getNote}}
 * {{getNote}}{{/if}}{{#if isInterface}}
 * @interface{{/if}}
 */
class {{getFullName}}{{#if getExtends}} extends {{#with getExtends}}{{getFullName}}{{/with}}{{/if}} {
  /**
   * Constructor for {{getFullName}}{{#if getNote}}
   * {{getNote}}{{/if}}{{#each getConstructorArgs}}
   * @param { {{getReturnType}} } {{getName}} TBD{{/each}}{{#if isPrivate}}
   * @private{{/if}}
   */
  constructor({{#each getConstructorArgs}}{{#if @first}}{{else}}, {{/if}}{{#if getName}}{{getName}}{{else}}param{{@index}}{{/if}}{{/each}}) {
{{#if getExtends}}    super();
{{/if}}{{#each getFields}}    this.{{getName}} = undefined;
{{/each}}
  }{{#each getMethods}}{{#if isNotConstructor}}

  /**{{#if getNote}}
   * {{getNote}}{{/if}}{{#each getParameters}}
   * @param { {{SafeString this getReturnType}} } {{getName}}{{#if getDefaultValue}}={{SafeString this getDefaultValue}}{{/if}} TBD{{/each}}{{#if needsReturnStatement}}
   * @return { {{getReturnType}} }{{/if}}{{#if isPrivate}}
   * @private{{/if}}
   */
  {{#if isAsync}}async {{/if}}{{getName}}({{#if getParameters}}{{#each getParameters}}{{#if @first}}{{else}}, {{/if}}{{#if getName}}{{getName}}{{#if getDefaultValue}}={{SafeString this getDefaultValue}}{{/if}}{{else}}param{{@index}}{{/if}}{{/each}}{{/if}}) {
    {{#if isInterface}}throw new Error('Not implemented');{{else}}{{#if this.needsReturnStatement}}return {{getReturnType}};{{else}}// TBD{{/if}}{{/if}}{{/if}}
  }{{/each}}
}

module.exports = {{getFullName}};
