import lodash from "lodash";
function mergeToolbarSettings({
  defaultSettings,
  customSettings
}) {
  return defaultSettings.reduce((mergedSettings, defaultSetting) => {
    const customSettingsByName = customSettings.filter((s) => s.name === defaultSetting.name);
    if (customSettingsByName.length > 0) {
      mergedSettings.push(lodash.merge(defaultSetting, customSettingsByName[0]));
    } else {
      mergedSettings.push(defaultSetting);
    }
    return mergedSettings;
  }, []);
}
export {
  mergeToolbarSettings
};
//# sourceMappingURL=merge-toolbar-settings.js.map
