<commit_before>import React from 'react';
import Lifespan from 'lifespan';
import Classnames from 'classnames';

import LocalClient from '../../stores/local-client.stores.jsx';

import FormError from '../shared/form-error.components.jsx';
import AccountValidationButton from '../shared/account-validation-button.components.jsx';

export default class SubscriptionChoosePlan extends React.Component {
	constructor(props) {
		super(props);
		this.state = {};
	}

	componentWillMount() {
		this.client = LocalClient.instance();
		this.lifespan = new Lifespan();

		this.client.getStore('/userStore', this.lifespan)
			.onUpdate(({head}) => {
				this.setState({
					selected: head.toJS().choosePlanForm.selected,
					error: head.toJS().choosePlanForm.error,
					loading: head.toJS().choosePlanForm.loading,
				});
			})
			.onDelete(() => {
				this.setState(undefined);
			});
	}

	componentWillUnmount() {
		this.lifespan.release();
	}

	confirmPlan() {
		this.client.dispatchAction('/confirm-plan', {plan: this.state.selected});
	}

	render() {
		const planMonthly = {
			id: 'personal_monthly',
			name: 'Monthly billing',
			amount: '15',
			period: '/month',
			info: 'Without commitment!',
		};

		const planYearly = {
			id: 'personal_annual',
			name: 'Yearly billing',
			amount: '144',
			period: '/year',
			info: 'Pay once for a whole year!',
		};

		const error = this.state.error ? <FormError errorText={this.state.error}/> : false;

		return (
			<div className="account-base subscription-choose-plan">
				<div className="subscription-choose-plan-plans">
					<SubscriptionPlan plan={planMonthly} selected={this.state.selected}/>
					<SubscriptionPlan plan={planYearly} selected={this.state.selected}/>
				</div>
				<div className="subscription-choose-plan-info">
					* Taxes are offered for private individuals. Currency ultimately depends on the country where your credit card has been issued.
				</div>
				{error}
				<AccountValidationButton loading={this.state.loading} label="Checkout" click={() => {this.confirmPlan();}}/>
			</div>
		);
	}
}

class SubscriptionPlan extends React.Component {
	componentWillMount() {
		this.client = LocalClient.instance();
	}

	choosePlan() {
		this.client.dispatchAction('/choose-plan', this.props.plan.id);
	}

	render() {
		const classes = Classnames({
			'subscription-plan': true,
			'is-active': this.props.selected === this.props.plan.id,
		});<commit_msg>removed april offer text<commit_after>import React from 'react';
import Lifespan from 'lifespan';
import Classnames from 'classnames';

import LocalClient from '../../stores/local-client.stores.jsx';

import FormError from '../shared/form-error.components.jsx';
import AccountValidationButton from '../shared/account-validation-button.components.jsx';

export default class SubscriptionChoosePlan extends React.Component {
	constructor(props) {
		super(props);
		this.state = {};
	}

	componentWillMount() {
		this.client = LocalClient.instance();
		this.lifespan = new Lifespan();

		this.client.getStore('/userStore', this.lifespan)
			.onUpdate(({head}) => {
				this.setState({
					selected: head.toJS().choosePlanForm.selected,
					error: head.toJS().choosePlanForm.error,
					loading: head.toJS().choosePlanForm.loading,
				});
			})
			.onDelete(() => {
				this.setState(undefined);
			});
	}

	componentWillUnmount() {
		this.lifespan.release();
	}

	confirmPlan() {
		this.client.dispatchAction('/confirm-plan', {plan: this.state.selected});
	}

	render() {
		const planMonthly = {
			id: 'personal_monthly',
			name: 'Monthly billing',
			amount: '15',
			period: '/month',
			info: 'Without commitment!',
		};

		const planYearly = {
			id: 'personal_annual',
			name: 'Yearly billing',
			amount: '144',
			period: '/year',
			info: 'Pay once for a whole year!',
		};

		const error = this.state.error ? <FormError errorText={this.state.error}/> : false;

		return (
			<div className="account-base subscription-choose-plan">
				<div className="subscription-title">
					Get 2 months free by choosing annual billing!
				</div>
				<div className="subscription-choose-plan-plans">
					<SubscriptionPlan plan={planMonthly} selected={this.state.selected}/>
					<SubscriptionPlan plan={planYearly} selected={this.state.selected}/>
				</div>
				<div className="subscription-choose-plan-info">
					* Taxes are offered for private individuals. Currency ultimately depends on the country where your credit card has been issued.
				</div>
				{error}
				<AccountValidationButton loading={this.state.loading} label="Checkout" click={() => {this.confirmPlan();}}/>
			</div>
		);
	}
}

class SubscriptionPlan extends React.Component {
	componentWillMount() {
		this.client = LocalClient.instance();
	}

	choosePlan() {
		this.client.dispatchAction('/choose-plan', this.props.plan.id);
	}

	render() {
		const classes = Classnames({
			'subscription-plan': true,
			'is-active': this.props.selected === this.props.plan.id,
		});
{'fraction_non_alphanumeric': 0.15412474849094568, 'fraction_numerical': 0.0022132796780684103, 'mean_word_length': 3.9217821782178217, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 31, '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': '3021469', 'n_tokens_mistral': 1788, 'n_tokens_neox': 1534, 'n_words': 328}