import { UseFormReturn } from "react-hook-form";
import { UiPropertyMeta } from "../../core/ui-property-meta";
import { WithIndexer } from "../../../../fd-toolbox-core/types/with-indexer";
import type { Element } from "../../../../fd-toolbox/types/react-types";
/**
 * Props passed to custom field components used within the {@link EditResource} form
 */
export interface EditResourceCustomFieldProps {
    /** React Hook Form instance for accessing and manipulating form state */
    form: UseFormReturn<WithIndexer<string>>;
    /** Ui metadata for the property associated with this field, if applicable */
    uiPropertyMeta?: UiPropertyMeta;
    /**
     * Event handler called when the field value changes
     * @param newPropertyValue - The new value of the property
     * @param propertyName - The name of the property being changed
     */
    editResourceOnChangeCallback?: (newPropertyValue: string, propertyName: string) => void;
}
/**
 * Configuration for custom fields to be displayed in the {@link EditResource} form
 */
export interface EditResourceCustomFieldConfig {
    /**
     * React component function that renders the custom field
     * @param props - Props passed to the component
     */
    component: (props: EditResourceCustomFieldProps) => Element;
    /** Optional priority to determine the display order */
    priority?: number;
    /** Optional name of the property this custom field is associated with */
    propertyName?: string;
    className?: string;
}
