text: "use strict";
  var __importStar = (this && this.__importStar) || function (mod) {
      if (mod && mod.__esModule) return mod;
      var result = {};
      if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
      result["default"] = mod;
      return result;
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  /*
   * Copyright (c) 2018, salesforce.com, inc.
   * All rights reserved.
   * SPDX-License-Identifier: MIT
   * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
   */
  const babylon = __importStar(require("@babel/parser"));
  const styleCompiler = __importStar(require("@lwc/style-compiler"));
  const errors_1 = require("@lwc/errors");
  function parseInlineStyles(src, stylesheetConfig) {
      let result;
      try {
          result = styleCompiler.transform(src, 'template_inline_styles', stylesheetConfig);
      }
      catch (e) {
          throw errors_1.normalizeToCompilerError(errors_1.TransformerErrors.CSS_IN_HTML_ERROR, e);
      }
      // The style compiler produces a module string
      const { code } = result;
      // Convert it to an AST
      const parsed = babylon.parse(code, { sourceType: 'module' });
      // Return the body of the module
      return parsed.program.body;
  }
  exports.default = parseInlineStyles;
  //# sourceMappingURL=styles.js.map