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

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

		return (
			<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@2kk8df`}
				{...otherProps} 
				advanceHeight={advanceHeight}
				hasMask={hasMask}
				keyParam={keyParam}
				searchType={searchType}
				datas={datas}
				selectedKey={selectedKey}
				buttons={buttons}
				searchsBaseValue={searchsBaseValue}
				showSearchAd={showSearchAd}
				setShowSearchAd={setShowSearchAd}
				searchsAd={searchsAd}
				buttonsAd={buttonsAd}
				onChange={handleTabChange}
				onSearch={handleSearch}
				onSearchChange={handleSearchChange}
			/>
		)
	}
}