<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';

import { TextField, Switch, Typography, withStyles, Box } from '@material-ui/core';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Dialog from '@material-ui/core/Dialog';
import DialogContent from '@material-ui/core/DialogContent';
import DialogTitle from '@material-ui/core/DialogTitle';
import DialogActions from '@material-ui/core/DialogActions';
import FormControl from '@material-ui/core/FormControl';
import Button from '@material-ui/core/Button';
import Paper from '@material-ui/core/Paper';
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
import MenuIcon from '@material-ui/icons/Menu';

import I18n from '@iobroker/adapter-react/i18n';
import DialogSelectID from '@iobroker/adapter-react/Dialogs/SelectID';
import isEqual from 'lodash.isequal';

const styles = theme => ({
    box: {
        display: 'inline-flex',
        justifyContent: 'space-around',
        padding: theme.spacing(2),
        width: 'calc(100% - ' + theme.spacing(4) + 'px)',
        position: 'relative',
    },
    container: {
        width: '70%',
        // minWidth: 340,
        padding: theme.spacing(2),
        [theme.breakpoints.down('md')]: {
            width: '90%',
        },
        [theme.breakpoints.down('lg')]: {
            width: '80%',
        },
    },
    textField: {
        flexBasis: '60%',
        [theme.breakpoints.down('sm')]: {
            width: '100%',
            marginTop: theme.spacing(1),
        },
    },
    submitForm: {
        flexDirection: 'row',
        margin: '10px auto 20px',
        display: 'flex',
        justifyContent: 'center',
        width: '100%',
        [theme.breakpoints.down('sm')]: {
            flexDirection: 'column',
        },
    },
    mainTitle: {
        marginBottom: '30px',
    },
    title: {
        [theme.breakpoints.down('md')]: {
            maxWidth: 200,
        },
        [theme.breakpoints.down('sm')]: {
            width: '100%',
        },
    },
    row: {
        [theme.breakpoints.down('md')]: {
            alignItems: 'center',
        },
        [theme.breakpoints.down('sm')]: {
            flexDirection: 'column',
            alignItems: 'flex-start',
            textAlign: 'center',
        },
    },
    btnDanger: {
        marginLeft: 20,
        [theme.breakpoints.down('sm')]: {
            marginLeft: 0,
            marginTop: theme.spacing(0.5),
        },
        //backgroundColor: theme.palette.error?.dark,
    },
    saveAndGoBtn: {
        marginRight: 20,
        [theme.breakpoints.down('sm')]: {
            marginRight: 0,
            marginBottom: theme.spacing(0.5),
        },
    },
    toggleIcon: {
        position: 'absolute',
        top: -15,
        left: 0,
        backgroundColor: theme.palette.primary.main,
        width: 20,
        height: 25,
        cursor: 'pointer',
        padding: theme.spacing(1),
        borderRadius: '0 5px 5px 0',
    },
});

class RightBar extends PureComponent {
    defaultState = {
        words: I18n.t('Create Rule'),
        name: I18n.t('Create Rule'),
        _break: false,
        editable: false,
        args: [
            {
                default: I18n.t('Argument') + ' 1',
            },
            {<commit_msg>fix typo<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';

import { TextField, Switch, Typography, withStyles, Box } from '@material-ui/core';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Dialog from '@material-ui/core/Dialog';
import DialogContent from '@material-ui/core/DialogContent';
import DialogTitle from '@material-ui/core/DialogTitle';
import DialogActions from '@material-ui/core/DialogActions';
import FormControl from '@material-ui/core/FormControl';
import Button from '@material-ui/core/Button';
import Paper from '@material-ui/core/Paper';
import ArrowBackIcon from '@material-ui/icons/ArrowBack';
import MenuIcon from '@material-ui/icons/Menu';

import I18n from '@iobroker/adapter-react/i18n';
import DialogSelectID from '@iobroker/adapter-react/Dialogs/SelectID';
import isEqual from 'lodash.isequal';

const styles = theme => ({
    box: {
        display: 'inline-flex',
        justifyContent: 'space-around',
        padding: theme.spacing(2),
        width: 'calc(100% - ' + theme.spacing(4) + 'px)',
        position: 'relative',
    },
    container: {
        width: '70%',
        // minWidth: 340,
        padding: theme.spacing(2),
        [theme.breakpoints.down('md')]: {
            width: '90%',
        },
        [theme.breakpoints.down('lg')]: {
            width: '80%',
        },
    },
    textField: {
        flexBasis: '60%',
        [theme.breakpoints.down('sm')]: {
            width: '100%',
            marginTop: theme.spacing(1),
        },
    },
    submitForm: {
        flexDirection: 'row',
        margin: '10px auto 20px',
        display: 'flex',
        justifyContent: 'center',
        width: '100%',
        [theme.breakpoints.down('xs')]: {
            flexDirection: 'column',
        },
    },
    mainTitle: {
        marginBottom: '30px',
    },
    title: {
        [theme.breakpoints.down('md')]: {
            maxWidth: 200,
        },
        [theme.breakpoints.down('sm')]: {
            width: '100%',
        },
    },
    row: {
        [theme.breakpoints.down('md')]: {
            alignItems: 'center',
        },
        [theme.breakpoints.down('sm')]: {
            flexDirection: 'column',
            alignItems: 'flex-start',
            textAlign: 'center',
        },
    },
    btnDanger: {
        marginLeft: 20,
        [theme.breakpoints.down('xs')]: {
            marginLeft: 0,
            marginTop: theme.spacing(0.5),
        },
        //backgroundColor: theme.palette.error?.dark,
    },
    saveAndGoBtn: {
        marginRight: 20,
        [theme.breakpoints.down('xs')]: {
            marginRight: 0,
            marginBottom: theme.spacing(0.5),
        },
    },
    toggleIcon: {
        position: 'absolute',
        top: -15,
        left: 0,
        backgroundColor: theme.palette.primary.main,
        width: 20,
        height: 25,
        cursor: 'pointer',
        padding: theme.spacing(1),
        borderRadius: '0 5px 5px 0',
    },
});

class RightBar extends PureComponent {
    defaultState = {
        words: I18n.t('Create Rule'),
        name: I18n.t('Create Rule'),
        _break: false,
        editable: false,
        args: [
            {
                default: I18n.t('Argument') + ' 1',
            },
            {
{'fraction_non_alphanumeric': 0.1518300948938093, 'fraction_numerical': 0.02078626299141437, 'mean_word_length': 2.051470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1531403', 'n_tokens_mistral': 2095, 'n_tokens_neox': 1992, 'n_words': 405}