import { type ReactNode } from "react";
import { type ButtonProps } from "../button/Button.js";
import { type PropsWithRef } from "../types.js";
import { type TextFieldProps } from "./TextField.js";
/**
 * @example Simple Example
 * ```tsx
 * const getVisibilityIcon: GetPasswordVisibilityIcon = (isPasswordVisible) => {
 *   if (isPasswordVisible) {
 *     return <SecurityIcon />;
 *   }
 *
 *   return <RemoveRedEyeIcon />;
 * };
 * ```
 *
 * @param isPasswordVisible - `true` when the password is visible and in plain
 * text
 * @returns a custom icon to use for the password visibility toggle.
 */
export type GetPasswordVisibilityIcon = (isPasswordVisible: boolean) => ReactNode;
/**
 * @example Simple Example
 * ```tsx
 * const visibilityIcon: ConfigurableVisibilityIcon = {
 *   visible: <SecurityIcon />,
 *   invisible: <RemoveRedEyeIcon />,
 * };
 * ```
 */
export interface ConfigurableVisibilityIcon {
    /**
     * The icon to display while the password is currently visible as plain text.
     */
    visible: ReactNode;
    /**
     * The icon to display while the password is currently invisible as the
     * password input.
     */
    invisible: ReactNode;
}
/**
 * @since 6.0.0 Removed the `visibilityStyle`, `visibilityClassName`, and
 * `onVisibilityClick` props in favor of `visibilityProps` object.
 * @since 6.0.0 Removed the `disableVisibility` and `rightChildren` props in
 * favor of just using a `TextField` instead of the `Password` component.
 * @since 6.0.0 Merged the `getVisibilityIcon` prop behavior into the
 * `visibilityIcon` prop.
 */
export interface PasswordProps extends Omit<TextFieldProps, "type" | "rightAddon"> {
    /**
     * @defaultValue `"password"`
     * @since 6.0.0 Defaults to `"password"`
     */
    name?: string;
    /**
     * @example Configurable Visibility Icon Object
     * ```tsx
     * <Password
     *   {...props}
     *   visibilityIcon={{
     *     visible: <SecurityIcon />,
     *     invisible: <RemoveRedEyeIcon />,
     *   }}
     * />
     * ```
     *
     * @example Get Password Visibility Icon Function
     * ```tsx
     * <Password
     *   {...props}
     *   visibilityIcon={(isPasswordVisible) => {
     *     if (isPasswordVisible) {
     *       return <SecurityIcon />;
     *     }
     *
     *     return <RemoveRedEyeIcon />;
     *   }}
     * />
     * ```
     *
     * @example Custom Icon
     * ```tsx
     * <Password
     *   {...props}
     *   visibilityIcon={<SomeCustomComponent />}
     * />
     * ```
     *
     * @since 6.0.0 Supports dynamically getting the visibility icon with a
     * callback function.
     */
    visibilityIcon?: ConfigurableVisibilityIcon | GetPasswordVisibilityIcon | ReactNode;
    /**
     * The `aria-label` to use for the password visibility icon button.
     *
     * @defaultValue `"Show password"`
     */
    visibilityLabel?: string;
    /**
     * Any props that should be passed to the password visibility icon button. If
     * `id`, `buttonType`, `aria-label`, `aria-pressed`, or `children` are
     * provided here, they will override the default implementation.
     */
    visibilityProps?: PropsWithRef<ButtonProps>;
}
/**
 * **Client Component**
 *
 * @example Simple Example
 * ```tsx
 * import { Password } from "@react-md/core/form/Password";
 *
 * function Example(): ReactElement {
 *   return  <Password label="Password" required />;
 * }
 * ```
 *
 * @see {@link https://react-md.dev/components/password | Password Demos}
 */
export declare const Password: import("react").ForwardRefExoticComponent<PasswordProps & import("react").RefAttributes<HTMLInputElement>>;
