import {
	observer
} from 'mobx-react';
import {
	WeaInputNumber,
	WeaLocaleProvider,
} from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;

@observer
export default class Section extends React.Component {
	render() {
		const {
			store,
		} = this.props, {
			workTimeType,
			sectionValue,
			handleSectionChange,
			isDistributeModeDisabled,
		} = store;

		return (
			<div className='section'>
				<i className='icon-coms-Tile' />
				<span style={{marginLeft:5}}>{`${workTimeType}${getLabel('505550',"区间")}`}</span>
				<WeaInputNumber ecId={`${this && this.props && this.props.ecId || ''}_WeaInputNumber@4u6fr7`} 
					min={0}
					disabled={isDistributeModeDisabled}
					value={sectionValue}
					onChange={handleSectionChange}
				/>
				<span>{getLabel('505552', "年")}</span>
			</div>
		);
	}
}