import { BetaSchemaForm, ProCard } from '@ant-design/pro-components';
import { PropsType } from '.';

export default function Query({
  columns,
  doRequest,
}: {
  columns?: PropsType['columns'];
  doRequest: (values: any) => void;
}) {
  return (
    <ProCard>
      <BetaSchemaForm
        layoutType="QueryFilter"
        onFinish={async (values: Record<string, any>) => {
          doRequest(values);
        }}
        columns={columns as any}
      />
    </ProCard>
  );
}
