import { ProFormText } from '@ant-design/pro-components';

type BaseFormTextProps = React.ComponentProps<typeof ProFormText>;
export type { BaseFormTextProps };

const BaseFormText = (props: BaseFormTextProps) => {
  return (
    <ProFormText
      {...props}
      placeholder={
        props?.placeholder ??
        `请输入${typeof props?.label === 'string' ? props?.label : ''}`
      }
    />
  );
};
const WrappedBaseFormText: typeof BaseFormText & {
  Password: typeof ProFormText.Password;
} = BaseFormText as any;

WrappedBaseFormText.Password = ProFormText.Password;

export default WrappedBaseFormText;
