import {
	observer
} from 'mobx-react';
import {
	WeaTab
} from 'ecCom';

@observer
export default class Search extends React.Component {
	render() {
		const {
			store
		} = this.props, {
			searchProps,
			datas,
			selectedKey,
			buttons,
			searchsBaseValue,
			showSearchAd,
			setShowSearchAd,
			searchsAd,
			buttonsAd,
			handleTabChange,
			handleSearch,
			handleSearchChange,
		} = store;

		return (
			<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@t9t6b2`} 
				{...searchProps}
				datas={datas}
				selectedKey={selectedKey}
				buttons={buttons}
				searchsBaseValue={searchsBaseValue}
				showSearchAd={showSearchAd}
				setShowSearchAd={setShowSearchAd}
				searchsAd={searchsAd}
				buttonsAd={buttonsAd}
				onChange={handleTabChange}
				onSearch={handleSearch}
				onSearchChange={handleSearchChange}
			/>
		)
	}
}