"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.I18nDependencyTemplate = exports.I18nDependency = void 0;

var _webpack = require("webpack");

// const webpack = require('webpack');
class I18nDependency extends _webpack.Dependency {
  constructor({
    identifier,
    i18nKeys
  }, context, identifierIndex) {
    super();
    this.identifier = identifier;
    this.identifierIndex = identifierIndex;
    this.i18nKeys = i18nKeys;
    this.context = context;
  }

  getResourceIdentifier() {
    return `i18n-module-${this.identifier}-${this.identifierIndex}`;
  }

}

exports.I18nDependency = I18nDependency;

class I18nDependencyTemplate {
  //eslint-disable-next-line no-empty-function
  apply() {} // apply(dep, source) {
  // if (typeof dep.range === "number") {
  // source.insert(0, `/* comment by I18nSplitPlugin , i18n keys = ${JSON.stringify(dep.i18nKeys)} */`);
  // 	return;
  // }
  // source.replace(dep.range[0], dep.range[1] - 1, dep.expression);
  // }


}

exports.I18nDependencyTemplate = I18nDependencyTemplate;