<commit_before>import React, { PropTypes } from 'react';

import { components } from '../../assets/common-prop-types.js';
import { dialogModes } from '../../assets/constants.js';

import DialogEditDroplet from '../dialogs/DialogEditDroplet.jsx';

var DialogComponents = {};
DialogComponents[dialogModes.EDIT_DROPLET] = DialogEditDroplet;

function Dialog(props) {
	var Component,
		classes = [props.settings.classes.dialog.main];

	if (props.state.dialog.mode !== dialogModes.NONE) {
		classes.push(props.settings.classes.dialog.visible);
	}

	Component = DialogComponents[props.state.dialog.mode];

	if (Component) {
		return (
			<div className={classes.join(' ')}>
				<Component
					class_ui={props.class_ui}
					class_template={props.class_template}
					state={props.state.dialog.state}
					onDialogComplete={props.onDialogComplete}
					onDialogCancel={props.onDialogCancel}/>
			</div>
		);
	} else {
		return (
			<div className={classes.join(' ')}></div>
		);<commit_msg>adjust dialog for new props<commit_after>import React, { PropTypes } from 'react';

import { components } from '../../assets/common-prop-types.js';
import { dialogModes } from '../../assets/constants.js';

import DialogEditDroplet from '../dialogs/DialogEditDroplet.jsx';

var DialogComponents = {};
DialogComponents[dialogModes.EDIT_DROPLET] = DialogEditDroplet;

function Dialog(props) {
	var Component,
		classes = [props.settings.classes.dialog.main];

	if (props.mode !== dialogModes.NONE) {
		classes.push(props.settings.classes.dialog.visible);
	}

	Component = DialogComponents[props.mode];

	if (Component) {
		return (
			<div className={classes.join(' ')}>
				<Component
					class_ui={props.class_ui}
					class_template={props.class_template}
					state={props.state}
					onDialogComplete={props.onDialogComplete}
					onDialogCancel={props.onDialogCancel}/>
			</div>
		);
	} else {
		return (
			<div className={classes.join(' ')}></div>
		);
{'fraction_non_alphanumeric': 0.15542974781266083, 'fraction_numerical': 0.0, 'mean_word_length': 4.2117962466487935, 'pattern_counts': {'":': 0, '<': 13, '<?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': '5700381', 'n_tokens_mistral': 681, 'n_tokens_neox': 612, 'n_words': 104}