/* @flow */ import React from 'react' import { connect } from 'react-redux' import { config } from 'react-spring' import { règleAvecMontantSelector } from 'Selectors/regleSelectors' import Animate from 'Ui/animate' import './ComparativeTargets.css' import SchemeCard from './ui/SchemeCard' // export default compose( // connect( // state => ({ // target: findRuleByDottedName( // flatRulesSelector(state), // state.simulationConfig?.objectifs[0] // ), // simulationBranches: state.simulationConfig?.branches, // analyses: analysisWithDefaultsSelector(state) // }), // dispatch => ({ // setSituationBranch: id => dispatch({ type: 'SET_SITUATION_BRANCH', id }) // }) // ), // withColours, // withSitePaths // )( // class ComparativeTargets extends React.Component { // render() { // let { // colours, // analyses, // target, // setSituationBranch, // sitePaths, // simulationBranches // } = this.props // if (!simulationBranches) { // return null // } // // We retrieve the values necessary to compute the global % of taxes // // This is not elegant // let getRatioPrélèvements = analysis => // analysis.targets.find(t => t.dottedName === 'ratio de prélèvements') // return ( // <> // {analyses.map((analysis, i) => { // if (!analysis.targets) return null // let { nodeValue, dottedName } = analysis.targets[0], // name = simulationBranches[i].nom // let microNotApplicable = // name === 'Micro-entreprise' && // analysis.controls?.find(({ test }) => // test.includes('base des cotisations > plafond') // ) // let ratioPrélèvements = getRatioPrélèvements(analysis) // return ( //
{microNotApplicable.message}
// ) : ( // <> // // //