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CAAAoB,IAAA;MAAA;IAAA;EAAA,GAAAzC,OAAA;AAAA,CAEN;;;;;;;AClED;;;;;;;ACAA","sources":["webpack://smetio/./developement/js/functions/replace/replaceColorsWithSmetioDataAttributesInSvg.js","webpack://smetio/ignored|C:\\Users\\chem_\\Documents\\creative\\smetio_playground\\developement\\js\\functions\\replace|fs","webpack://smetio/ignored|C:\\Users\\chem_\\Documents\\creative\\smetio_playground\\developement\\js\\functions\\replace|path"],"sourcesContent":["const fs = require('fs').promises;\r\nconst path = require('path');\r\n\r\nexports.replaceColorsWithSmetioDataAttributesInSvg = async (data = {\r\n imagePath: \"../../../../production/img/appImages/SVG/\",\r\n imageName: \"personalDetails_test\",\r\n}) => {\r\n\r\n const { imagePath, imageName } = data;\r\n const colors = {\r\n dominant: [\"#102040\", \"#0f203f\"],\r\n accent: [\"#96b3d9\"],\r\n warning: [\"#dfc08b\"],\r\n neutral: [\"#e9eff7\"]\r\n };\r\n\r\n // const imagePath = \"../../../../production/img/appImages/SVG/\";\r\n // const imageName = \"personalDetails_test\";\r\n\r\n const image = `${imagePath}${imageName}.svg`;\r\n\r\n let newContent = await fs.readFile(path.resolve(__dirname, image), 'utf8');\r\n\r\n // let newContent = data;\r\n\r\n for (const key in colors) {\r\n\r\n const colorArr = colors[key];\r\n\r\n for (let i = 0; i < colorArr.length; i++) {\r\n const colorCode = colorArr[i];\r\n let replaceFill = `fill=\"${colorCode}\"`;\r\n replaceFill = new RegExp(replaceFill, \"g\");\r\n\r\n let replaceStroke = `stroke=\"${colorCode}\"`;\r\n replaceStroke = new RegExp(replaceStroke, \"g\");\r\n\r\n newContent = newContent.replaceAll(replaceFill, `data-smetio-${key}-fill=true`);\r\n newContent = newContent.replaceAll(replaceStroke, `data-smetio-${key}-stroke=true`);\r\n };\r\n\r\n };\r\n\r\n const jsFile = `${imagePath}${imageName}.js`\r\n const jsFileContent = `\r\n export default function ${imageName}() {\r\n \r\n return\\`\r\n ${newContent}\r\n \\`;\r\n }\r\n `;\r\n\r\n const txtFile = `${imagePath}${imageName}.txt`;\r\n const txtContent = newContent;\r\n\r\n // fs.writeFile(path.resolve(__dirname, jsFile), jsFileContent, function (err) {\r\n // if (err) throw err;\r\n // console.log('js file created');\r\n // });\r\n\r\n fs.writeFile(path.resolve(__dirname, txtFile), txtContent, function (err) {\r\n if (err) throw err;\r\n console.log('txt file created');\r\n });\r\n\r\n};\r\n","/* (ignored) */","/* (ignored) */"],"names":["fs","require","promises","path","exports","replaceColorsWithSmetioDataAttributesInSvg","_asyncToGenerator","regeneratorRuntime","mark","_callee","data","imagePath","imageName","colors","image","newContent","key","colorArr","i","colorCode","replaceFill","replaceStroke","jsFile","jsFileContent","txtFile","txtContent","_args","arguments","wrap","_callee$","_context","prev","next","length","undefined","dominant","accent","warning","neutral","concat","readFile","resolve","__dirname","sent","RegExp","replaceAll","writeFile","err","console","log","stop"],"sourceRoot":""}