function _templateObject() {
  var data = _taggedTemplateLiteral(["\n      ", "\n      import { css } from '@emotion/core';\n\n      import { propTypes, defaultProps, iconStyles } from '", "';\n\n      const ", " = (props) => {\n        ", "\n\n        return (\n          ", "\n        );\n      };\n\n      ", ".propTypes = propTypes;\n      ", ".defaultProps = defaultProps;\n\n      ", "\n    "]);

  _templateObject = function _templateObject() {
    return data;
  };

  return data;
}

function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }

var addCssJsxAttribute = require('./addCssJsxAttribute.js');

var addRestSpreadJsxAttribute = require('./addRestSpreadJsxAttribute.js');

var deprecatedIcons = require('../icons/deprecatedList.js');

function transformTemplateForUtilLocation(utilLocation) {
  return function transformTemplate(_ref, opts, // eslint-disable-next-line no-unused-vars
  _ref2) {
    var template = _ref.template;
    var imports = _ref2.imports,
        componentName = _ref2.componentName,
        props = _ref2.props,
        jsx = _ref2.jsx,
        exports = _ref2.exports;
    addCssJsxAttribute(jsx);
    addRestSpreadJsxAttribute(jsx); // componentName comes through as an AST node with "Svg" prepended
    // normalize the name so we can look it up on our deprecation list

    var normalizedComponentName = componentName.name.replace(/Svg/, '');
    var deprecationMessage = deprecatedIcons[normalizedComponentName];
    var deprecationNotice = deprecationMessage ? "console.warn('[Deprecation Warning]: ".concat(deprecationMessage, "');") : '';
    return template.ast(_templateObject(), imports, utilLocation, componentName, deprecationNotice, jsx, componentName, componentName, exports);
  };
}

;
module.exports = transformTemplateForUtilLocation;