import {FilterButtonGroup, FilterField} from '@components';
import {Card, Row} from 'antd';
import {FC} from 'react';
import {useField, useHandle} from './hooks';

const Filter: FC = function() {
  const [value, onChange] = useField();
  const {onSearch, onExport} = useHandle(value);

  return (
    <Card>
      <Row>
        <FilterField name='roleName' label='角色名称' value={value} onChange={onChange} />
        <FilterButtonGroup onSearch={onSearch} onExport={onExport} offset={12} />
      </Row>
    </Card>
  );
};

export default Filter;
