<commit_before>import React from 'react';
import { localize } from '../../../../../_common/localize';

class AccountSwitcher extends React.PureComponent {
    constructor(props) {
        super(props);
        this.state = {
            is_collapsed  : false,
            active_account: this.props.active_account[0],
        };
    }

    toggleAccountsList = () => {
        this.setState({
            is_collapsed: !this.state.is_collapsed,
        });
    }

    switchAccount = (account) => {
        this.setState({
            active_account: account,
        });
    }

    render() {
        const account_list_collapsed = {
            visibility: `${this.state.is_collapsed ? 'visible' : 'hidden'}`,
            position  : 'absolute',
            height    : 'calc(100% - 32px)',
            width     : '100%',
        };

        const account_is_hidden = (account) => {
            if (account.id === this.state.active_account.id) {
                return true;
            }
            return false;
        };

        return (
            <div className='acc-switcher-container'>
                <div className='acc-switcher-header' onClick={this.toggleAccountsList}>
                    <div className='acc-switcher-active-login'><commit_msg>fixed height of scrollbar for account switcher<commit_after>import React from 'react';
import { localize } from '../../../../../_common/localize';

class AccountSwitcher extends React.PureComponent {
    constructor(props) {
        super(props);
        this.state = {
            is_collapsed  : false,
            active_account: this.props.active_account[0],
        };
    }

    toggleAccountsList = () => {
        this.setState({
            is_collapsed: !this.state.is_collapsed,
        });
    }

    switchAccount = (account) => {
        this.setState({
            active_account: account,
        });
    }

    render() {
        const account_list_collapsed = {
            visibility: `${this.state.is_collapsed ? 'visible' : 'hidden'}`,
            position  : 'absolute',
            height    : 'calc(100% - 158px)',
            width     : '100%',
        };

        const account_is_hidden = (account) => {
            if (account.id === this.state.active_account.id) {
                return true;
            }
            return false;
        };

        return (
            <div className='acc-switcher-container'>
                <div className='acc-switcher-header' onClick={this.toggleAccountsList}>
                    <div className='acc-switcher-active-login'>
{'fraction_non_alphanumeric': 0.13203125, 'fraction_numerical': 0.007421875, 'mean_word_length': 1.6986301369863013, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '6205098', 'n_tokens_mistral': 716, 'n_tokens_neox': 702, 'n_words': 125}