<commit_before>import React from 'react';

import Component from '../Component';
import Control from '../Control';
import pressable from '../pressable';

class Button extends Control {
    render() {
        var children = this._wrappedChildren;
        if (!children) {
            children = this._wrappedChildren = Component.wrap(this.props.children, child => (
                <span className="button__text">{child}</span>
            ));
        }

        if (this.props.type === 'link') {
            const url = this.props.disabled ? null : this.props.url;

            return (
                <a className={this.className()} {...this.getControlHandlers()} ref="control" role="link" href={url}>
                    {children}
                </a>
            );
        } else {
            return (
                <button className={this.className()} {...this.getControlHandlers()} ref="control" name={this.props.name} disabled={this.props.disabled}>
                    {children}
                </button>
            );
        }
    }

    className() {
        var className = 'button';

        const theme = this.props.theme || this.context.theme;
        if (theme) {
            className += ' button_theme_' + theme;
        }<commit_msg>Ненужная переменная<commit_after>import React from 'react';

import Component from '../Component';
import Control from '../Control';
import pressable from '../pressable';

class Button extends Control {
    render() {
        if (!this._wrappedChildren) {
            this._wrappedChildren = Component.wrap(this.props.children, child => (
                <span className="button__text">{child}</span>
            ));
        }

        if (this.props.type === 'link') {
            const url = this.props.disabled ? null : this.props.url;

            return (
                <a className={this.className()} {...this.getControlHandlers()} ref="control" role="link" href={url}>
                    {this._wrappedChildren}
                </a>
            );
        } else {
            return (
                <button className={this.className()} {...this.getControlHandlers()} ref="control" name={this.props.name} disabled={this.props.disabled}>
                    {this._wrappedChildren}
                </button>
            );
        }
    }

    className() {
        var className = 'button';

        const theme = this.props.theme || this.context.theme;
        if (theme) {
            className += ' button_theme_' + theme;
        }
{'fraction_non_alphanumeric': 0.14086193136472466, 'fraction_numerical': 0.0, 'mean_word_length': 1.7671081677704195, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, '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': '622528', 'n_tokens_mistral': 655, 'n_tokens_neox': 639, 'n_words': 141}