import _ from "lodash-es";
//#region src/utilities/stringUtils.js
/**
* stringToProps
*
* @export
* @param {*} stringProperties
* @return {*}
*/
function stringToProps(stringProperties) {
	if (!stringProperties) throw new Error("No properties found");
	let configObject = {};
	try {
		const configArray = JSON.parse(stringProperties);
		configObject = _.fromPairs(configArray.map((item) => {
			return [_.camelCase(item.key || item.Key), _.has(item, "Value") ? item.Value : item.value || ""];
		}));
	} catch (error) {
		return { error: error.message };
	}
	return { attributes: configObject };
}
//#endregion
export { stringToProps };

//# sourceMappingURL=stringUtils.mjs.map