import React, { ReactElement } from 'react';
import { CommonProps } from '../../props/common/types';
export type FormControlProps = CommonProps & {
/**
* The field label. This is needed for accessibility purposes, but can be
* hidden using the `hideLabel` prop.
*/
label: string;
/**
* When provided, will be forwarded to the wrapper View. You can also reference
* input and error elements using `-input` and `-error` suffixes respectively.
*
* @example
*
*
*
*
* element(by.id('form-control')) // Reference to the root View
* element(by.id('form-control-input')) // Reference to the input
* element(by.id('form-control-error')) // Reference to the error text
*/
testID?: string;
/**
* Use this to hide the `label` visually, but keep it in the accessibility
* tree.
*/
hideLabel?: boolean;
/**
* Additional descriptive text that appears below the input field
* to provide more context or instructions to the user.
*/
description?: string;
/**
* Error message to display when the field has an invalid value.
*/
error?: string;
/**
* Indicates if the field is required. When false, adds a "Optional"
* indicator next to the label.
*/
required?: boolean;
children: ReactElement;
/**
* @deprecated The attribute is meant for internal usage only
* @see https://preply.atlassian.net/wiki/spaces/PDS/pages/3909812539/Design+System+visual+coverage
* @ignore
*/
preplyDsComponent?: string;
};
/**
* FormControl component provides a consistent layout and accessibility
* for the form fields. You can use it to create custom fields not supported
* by the DS yet.
*
* Note that FormControl will implicitly provide `accessibilityLabel`,
* `invalid` and `testID` props to the child component.
*
* @example
*
*
*
*
* @see {@link https://github.com/preply/design-system/blob/main/packages/rn-lib/src/components/FormControl/FormControl.stories.tsx FormControl.stories.tsx} for complete example
*/
export declare const FormControl: ({ testID, label, hideLabel, description, error, required, children, preplyDsComponent, }: FormControlProps) => React.JSX.Element;
//# sourceMappingURL=FormControl.d.ts.map