<commit_before>import React, {Component, PropTypes} from 'react';
import ReactDOM from 'react-dom';
import {component as ConfirmationModal} from '../../application/confirmation-popin';
import Connect from '../../behaviours/store/connect';
import {application} from 'focus-core';
const {builtInStore: applicationStore} = application;
const propTypes = {
    isVisible: PropTypes.bool,
    ConfirmContentComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
    handleCancel: PropTypes.func.isRequired,
    handleConfirm: PropTypes.func.isRequired
};

const defaultProps = {
    isVisible: false,
    ConfirmContentComponent: null
};

@Connect(
    [{store: applicationStore, properties: ['confirmConfig']}],
    () => {
        const {isVisible = false, Content: ConfirmContentComponent = null, handleCancel, handleConfirm} = applicationStore.getConfirmConfig() || {};

        const exp = {isVisible, ConfirmContentComponent, handleCancel, handleConfirm};
        return exp;
    }
)
class ConfirmWrapper extends Component {
    render() {
        console.log('confirm wrapper')
        const {isVisible, ConfirmContentComponent, handleCancel, handleConfirm} = this.props;
        return isVisible ? <ConfirmationModal open={true} handleCancel={handleCancel} handleConfirm={handleConfirm}>{ConfirmContentComponent ? <ConfirmContentComponent /> : <div>Hello</div>}</ConfirmationModal> : null;
    }
}

ConfirmWrapper.propTypes = propTypes;
ConfirmWrapper.defaultProps = defaultProps;
ConfirmWrapper.displayName = 'ConfirmWrapper';

export default ConfirmWrapper;<commit_msg>[confirm] Rename handlers to math confirmation popin props.<commit_after>import React, {Component, PropTypes} from 'react';
import ReactDOM from 'react-dom';
import {component as ConfirmationModal} from '../../application/confirmation-popin';
import Connect from '../../behaviours/store/connect';
import {application} from 'focus-core';
const {builtInStore: applicationStore} = application;
const propTypes = {
    isVisible: PropTypes.bool,
    ConfirmContentComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
    handleCancel: PropTypes.func.isRequired,
    handleConfirm: PropTypes.func.isRequired
};

const defaultProps = {
    isVisible: false,
    ConfirmContentComponent: null
};


@Connect(
    [{store: applicationStore, properties: ['confirmConfig']}],
    () => {
        const {isVisible = false, Content: ConfirmContentComponent = null, handleCancel: cancelHandler, handleConfirm: confirmHandler} = applicationStore.getConfirmConfig() || {};
        return {isVisible, ConfirmContentComponent, cancelHandler, confirmHandler};
    }
)
class ConfirmWrapper extends Component {
    render() {
        console.log('confirm wrapper', this.props);
        const {isVisible, ConfirmContentComponent, cancelHandler, confirmHandler} = this.props;
        return isVisible ? <ConfirmationModal open={true} cancelHandler={cancelHandler} confirmHandler={confirmHandler}>{ConfirmContentComponent ? <ConfirmContentComponent /> : null}</ConfirmationModal> : null;
    }
}

ConfirmWrapper.propTypes = propTypes;
ConfirmWrapper.defaultProps = defaultProps;
ConfirmWrapper.displayName = 'ConfirmWrapper';

export default ConfirmWrapper;
{'fraction_non_alphanumeric': 0.11530139103554869, 'fraction_numerical': 0.0, 'mean_word_length': 5.223076923076923, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3690407', 'n_tokens_mistral': 824, 'n_tokens_neox': 830, 'n_words': 202}