"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.processRawFragmentValue = processRawFragmentValue;
var _model = require("@atlaskit/editor-prosemirror/model");
var _processRawValue = require("./processRawValue");
function processRawFragmentValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
  if (!value) {
    return;
  }
  var adfEntities = value.map(function (item) {
    return (0, _processRawValue.processRawValue)(schema, item, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent);
  }).filter(function (item) {
    return Boolean(item);
  });
  if (adfEntities.length === 0) {
    return;
  }
  return _model.Fragment.from(adfEntities);
}