import type { StringLike } from "@ariakit/core/form/types";
import type { ButtonOptions } from "../button/button.js";
import type { As, Props } from "../utils/types.js";
import type { FormStore } from "./form-store.js";
/**
 * Returns props to create a `FormRemove` component.
 * @see https://ariakit.org/components/form
 * @example
 * ```jsx
 * const store = useFormStore({
 *   defaultValues: {
 *     languages: ["JavaScript", "PHP"],
 *   },
 * });
 * const props = useFormRemove({
 *   store,
 *   name: store.names.languages,
 *   index: 0,
 * });
 * const values = store.useState("values");
 *
 * <Form store={store}>
 *   {values.languages.map((_, i) => (
 *     <FormInput key={i} name={store.names.languages[i]} />
 *   ))}
 *   <Role {...props}>Remove first language</Role>
 * </Form>
 * ```
 */
export declare const useFormRemove: import("../utils/types.js").Hook<FormRemoveOptions<"button">>;
/**
 * Renders a button that will remove an item from an array field in the form
 * when clicked.
 * @see https://ariakit.org/components/form
 * @example
 * ```jsx
 * const form = useFormStore({
 *   defaultValues: {
 *     languages: ["JavaScript", "PHP"],
 *   },
 * });
 * const values = form.useState("values");
 *
 * <Form store={form}>
 *   {values.languages.map((_, i) => (
 *     <div key={i}>
 *       <FormInput name={form.names.languages[i]} />
 *       <FormRemove name={form.names.languages} index={i} />
 *     </div>
 *   ))}
 * </Form>
 * ```
 */
export declare const FormRemove: import("../utils/types.js").Component<FormRemoveOptions<"button">>;
export interface FormRemoveOptions<T extends As = "button"> extends ButtonOptions<T> {
    /**
     * Object returned by the `useFormStore` hook. If not provided, the parent
     * `Form` component's context will be used.
     */
    store?: FormStore;
    /**
     * Name of the array field.
     */
    name: StringLike;
    /**
     * Index of the item to remove.
     */
    index: number;
    /**
     * Whether the focus should be moved to the next or previous field when the
     * button is clicked.
     * @default true
     */
    autoFocusOnClick?: boolean;
}
export type FormRemoveProps<T extends As = "button"> = Props<FormRemoveOptions<T>>;
