<commit_before>import * as React from 'react';

interface ITabs {
    onClick(i: any): void;
    size?: 'normal' | 'large' | 'small'; // defaults to 'normal'
    theme?: 'light' | 'dark'; // defaults to 'light'
    children: Array<any>;
}

interface ITabLabel {
    label: string;
    indexValue: number;
}

interface ITabPanel {
    theme?: 'light' | 'dark'; // defaults to 'light'
    children: any;
    activePanel: number;
}

interface ITabContent {
    indexValue: number;
    children: any;
}

export const TabLabel = ({ label }: ITabLabel) => {
    return (
        <span>{label}</span>
    );
};

export const Tabs = ({ children, onClick }: ITabs) => {
    const [index, setIndex] = React.useState(0);

    function handleSelected(i: number) {
        setIndex(i);
        handleClick(i);
    }

    const handleClick = (i: number) => {
        onClick(i);
    };

    return (
        <ul className='nav-tabs' role='tablist'>
            {children.map((item, i) =>
                <li key={i} className={'nav-tabs__tab' + (index === i ? ' nav-tabs__tab--active' : '')} >
                    <button
                        className='nav-tabs__link'
                        onClick={() => handleSelected(i)}
                        role='tab'
                        aria-selected={index === i ? 'true' : 'false'} >
                        {item}
                    </button>
                </li>)}
        </ul>
    );
};

export const TabContent = ({ theme, children, activePanel }: ITabPanel) => {
    return (
        <div className={'nav-tabs__content' +
            (theme === 'dark' ? ' nav-tabs__content--ui-dark' : '')}>
            {children.map((panel, i) =>
                panel.props.indexValue === activePanel ?
                    <div className="nav-tabs__pane" role="tabpanel" key={i}>{panel}</div> : null)}
        </div>
    );
};

export const TabPanel = ({ children, indexValue }: ITabContent) => {
    return (
        <React.Fragment key={indexValue}>
            {children}
        </React.Fragment>
    );
};
<commit_msg>fix test error<commit_after>import * as React from 'react';

interface ITabs {
    onClick(i: any): void;
    size?: 'normal' | 'large' | 'small'; // defaults to 'normal'
    theme?: 'light' | 'dark'; // defaults to 'light'
    children: Array<any>;
}

interface ITabLabel {
    label: string;
    indexValue: number;
}

interface ITabPanel {
    theme?: 'light' | 'dark'; // defaults to 'light'
    children: any;
    activePanel: number;
}

interface ITabContent {
    indexValue: number;
    children: any;
}

export const TabLabel = ({ label }: ITabLabel) => {
    return (
        <span>{label}</span>
    );
};

export const Tabs = ({ children, onClick }: ITabs) => {
    const [index, setIndex] = React.useState(0);

    function handleSelected(i: number) {
        setIndex(i);
        handleClick(i);
    }

    const handleClick = (i: number) => {
        onClick(i);
    };

    return (
        <ul className='nav-tabs' role='tablist'>
            {children.map((item, i) =>
                <li key={i} className={'nav-tabs__tab' + (index === i ? ' nav-tabs__tab--active' : '')} >
                    <button
                        className='nav-tabs__link'
                        onClick={() => handleSelected(i)}
                        role='tab'
                        aria-selected={index === i ? 'true' : 'false'} >
                        {item}
                    </button>
                </li>)}
        </ul>
    );
};

export const TabContent = ({ theme, children, activePanel }: ITabPanel) => {
    return (
        <div className={'nav-tabs__content' +
            (theme === 'dark' ? ' nav-tabs__content--ui-dark' : '')}>
            {children.map((panel: any, i: number) =>
                panel.props.indexValue === activePanel ?
                    <div className="nav-tabs__pane" role="tabpanel" key={i}>{panel}</div> : null)}
        </div>
    );
};

export const TabPanel = ({ children, indexValue }: ITabContent) => {
    return (
        <React.Fragment key={indexValue}>
            {children}
        </React.Fragment>
    );
};

{'fraction_non_alphanumeric': 0.16271186440677965, 'fraction_numerical': 0.00048426150121065375, 'mean_word_length': 1.9030217849613493, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 49, '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': '3615861', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1230, 'n_words': 274}