import {ModalField} from '@components';
import {FC} from 'react';
import {useField, useFormValues} from './hooks';

type Props = {
  id: string,

};

const Info: FC<Props> = function({id}) {
  const {control} = useField();
  useFormValues(id);

  return (
    <>
      <ModalField
        name='menuName'
        label='菜单名称'
        control={control}
      />
      <ModalField
        name='menuUrl'
        label='菜单路径'
        control={control}
      />
      <ModalField
        name='menuIcon'
        label='菜单图标'
        control={control}
        required={false}
      />
      <ModalField
        name='menuOrderBy'
        label='菜单排序'
        control={control}
        type='number'
      />

    </>
  );
};

export default Info;
