const getLayersAsFlatArray = function () {
  let optLayers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  let layers = [];
  optLayers.forEach(l => {
    layers.push(l);
    const {
      children
    } = l;
    layers = layers.concat(getLayersAsFlatArray(children));
  });
  return layers;
};
export default getLayersAsFlatArray;
//# sourceMappingURL=getLayersAsFlatArray.js.map