const fs = require('fs'); let content = fs.readFileSync('src/App.jsx', 'utf8'); let lines = content.split('\n'); // 1312 is index 1311. // 1327 is index 1326. // We want to remove from index 1311 up to (but not including) index 1326. // Count to remove = 1326 - 1311 = 15 lines. const newContent = `
{['Vermelho', 'Azul', 'Amarelo', 'Verde', 'Laranja', 'Roxo', 'Branco', 'Preto', 'Cinzento', 'Bege'].map(c => { const translatedColor = c === 'Vermelho' ? t('colorRed') : c === 'Azul' ? t('colorBlue') : c === 'Amarelo' ? t('colorYellow') : c === 'Verde' ? t('colorGreen') : c === 'Laranja' ? t('colorOrange') : c === 'Roxo' ? t('colorPurple') : c === 'Branco' ? t('colorWhite') : c === 'Preto' ? t('colorBlack') : c === 'Cinzento' ? t('colorGray') : c === 'Bege' ? t('colorBeige') : c; return ( ); })}
{itemColors.length === 0 &&

Selecione pelo menos uma cor

}
`.split('\n'); lines.splice(1311, 16, ...newContent); fs.writeFileSync('src/App.jsx', lines.join('\n')); console.log('App.jsx fixed successfully!');