{"size": 754, "ext": "js", "max_stars_repo_path": "src/lib/VueGraphqlModels.js", "max_stars_repo_name": "SmartXXI/vue-graphql-models", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/lib/VueGraphqlModels.js", "max_issues_repo_name": "SmartXXI/vue-graphql-models", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/lib/VueGraphqlModels.js", "max_forks_repo_name": "SmartXXI/vue-graphql-models", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.9285714286, "max_line_length": 84, "alphanum_fraction": 0.6180371353}
import BaseModel from '../models/BaseModel';
import Field from '../models/Forms/Field';
import MenuItem from '../models/Menu/repository/MenuItem';

const VueGraphqlModels = {
  install(Vue, $vgmOptions = {}) {
    Object.assign(Vue.prototype, {
      $vgmOptions,
    });

    Vue.mixin({
      created() {
        if (!Vue.prototype.$pluginInstalled) {
          console.info(`VGM Installed successfully. Version: ${BaseModel.version}`);

          Object.assign(BaseModel.prototype, { vue: this });
          Object.assign(MenuItem.prototype, { vue: this });
          Object.assign(Field.prototype, { vue: this });

          Object.assign(Vue.prototype, { $pluginInstalled: true });
        }
      }
    });
  }
};

export default VueGraphqlModels;
