/*
 * Author: 黎永顺
 * name:薪酬统计报表-高级搜索
 * Description:
 * Date: 2024/3/26
 */
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { Button } from "antd";
import { WeaInputSearch, WeaLocaleProvider } from "ecCom";
import "./index.less";

const getLabel = WeaLocaleProvider.getLabel;

@inject("baseTableStore")
@observer
class Index extends Component {
  render() {
    const { baseTableStore: { VSalryForm }, searchType } = this.props;
    return (
      <div className="variable-advance-search">
        <WeaInputSearch value={VSalryForm.getFormParams().username}
                        onChange={v => VSalryForm.updateFields({ username: v })}
                        onSearch={this.props.onAdvanceSearch}
        />
        {
          searchType === "advance" && <Button type="ghost" className="wea-advanced-search text-elli"
                                              onClick={this.props.onOpenAdvanceSearch}>{getLabel(545754, "高级搜索")}</Button>
        }
      </div>
    );
  }
}

export default Index;
