"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.configVariableConversionPlugin = configVariableConversionPlugin;

var _VariableConversionCollector = _interopRequireDefault(require("../custom_plugins/VariableConversionCollector"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function configVariableConversionPlugin(options) {
  const {
    cssVariableReplacement
  } = options.css.plugins;

  if (cssVariableReplacement.enable === false) {
    return false;
  }

  return new _VariableConversionCollector.default({
    configFile: cssVariableReplacement.configFile,
    patterns: cssVariableReplacement.patterns
  });
}