/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2023-02-09 15:47:28
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2023-02-09 17:13:01
 * @FilePath: /BudgetManaSystem/src/components/BMSModalForm/index.tsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { ModalForm, ModalFormProps } from "@ant-design/pro-components";
import { FormLayout } from "antd/es/form/Form";
import { useState } from "react";


export type BMSModalFormProps = ModalFormProps & {

}


const LAYOUT_TYPE_HORIZONTAL = 'horizontal';

const BMSModalForm = (props: BMSModalFormProps) => {

    const { children, ...rest } = props;
    const [formLayoutType, setFormLayoutType] = useState<FormLayout>('vertical');

    const [grid, setGrid] = useState(true);

    return (
        <ModalForm {...rest}
            layout={formLayoutType}
            grid={grid}
            rowProps={{
                gutter: [16, formLayoutType === 'inline' ? 16 : 0],
            }}
        >
            {children}
        </ModalForm>
    )
}


export default BMSModalForm