text: /* eslint-disable consistent-return */
  const chalk = require('chalk');
  const EntityClientGenerator = require('generator-jhipster/generators/entity-client');
  const writeFiles = require("./files").writeFiles;
  
  module.exports = class extends EntityClientGenerator {
      constructor(args, opts) {
          super(args, Object.assign({fromBlueprint: true}, opts)); // fromBlueprint variable is important
  
          const jhContext = this.jhipsterContext = this.options.jhipsterContext;
  
          if (!jhContext) {
              this.error(`This is a JHipster blueprint and should be used only like ${chalk.yellow('jhipster --blueprint generator-jhipster-sample-blueprint')}`);
          }
  
          this.configOptions = jhContext.configOptions || {};
      }
  
      get writing() {
          /**
           * Any method beginning with _ can be reused from the superclass `EntityClientGenerator`
           *
           * There are multiple ways to customize a phase from JHipster.
           *
           * 1. Let JHipster handle a phase, blueprint doesnt override anything.
           * ```
           *      return super._writing();
           * ```
           *
           * 2. Override the entire phase, this is when the blueprint takes control of a phase
           * ```
           *      return {
           *          myCustomWritePhaseStep() {
           *              // Do all your stuff here
           *          },
           *          myAnotherCustomWritePhaseStep(){
           *              // Do all your stuff here
           *          }
           *      };
           * ```
           *
           * 3. Partially override a phase, this is when the blueprint gets the phase from JHipster and customizes it.
           * ```
           *      const phaseFromJHipster = super._writing();
           *      const myCustomPhaseSteps = {
           *          writeClientFiles() {
           *              // override the writeClientFiles method from the _writing phase of JHipster
           *          },
           *          myCustomInitPhaseStep() {
           *              // Do all your stuff here
           *          },
           *      }
           *      return Object.assign(phaseFromJHipster, myCustomPhaseSteps);
           * ```
           */
          // Here we are not overriding this phase and hence its being handled by JHipster
          return writeFiles.call(this);
      }
  
      get end() {
          // Here we are not overriding this phase and hence its being handled by JHipster
          return super._end();
      }
  };
  