import {
	WeaLocaleProvider,
} from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;

export default class AccountIcon extends React.Component {
	render() {
		const {
			isShow,
			onClick
		} = this.props;

		const style = {
			padding: 6,
			border: '1px solid #D9D9D9',
			cursor: 'pointer'
		};

		if (isShow) {
			Object.assign(style, {
				color: '#2DB7F5'
			});
		}

		if (isShow) {
			return (
				<i 
					className='icon-coms-ShowNoAccount' 
					style={style} 
					title={getLabel('503885','隐藏无账号人员') } 
					onClick={() => onClick(false)}
				/>
			)
		} else {
			return (
				<i 
					className='icon-coms-NoAccountNoDisplay' 
					style={style} 
					title={getLabel('503886','显示无账号人员') }
					onClick={() => onClick(true)} 
				/>
			);
		}
	}
}