import { FieldValues, FieldPath, UseFormReturn } from 'react-hook-form';

interface TabDefinition<T extends FieldValues = FieldValues> {
    /** Unique tab identifier, used as ProgressTabs value */
    id: string;
    /** i18n key for the tab label (used when `label` is not provided) */
    labelKey: string;
    /** Raw label string (overrides `labelKey`) */
    label?: string;
    /** Fields validated when navigating forward from this tab. If omitted, full form validation is used. */
    validationFields?: FieldPath<T>[];
    /** Predicate to conditionally show/hide this tab at runtime */
    isVisible?: (form: UseFormReturn<T>) => boolean;
}
/**
 * Helper to declare tab metadata on a component with type safety.
 *
 * Usage:
 * ```ts
 * const MyTab = () => { ... }
 * MyTab._tabMeta = defineTabMeta<MyFormSchema>({
 *   id: "details",
 *   labelKey: "products.create.tabs.details",
 *   validationFields: ["title", "handle"],
 * })
 * ```
 */
declare const defineTabMeta: <T extends FieldValues = FieldValues>(meta: TabDefinition<T>) => TabDefinition<T>;

/**
 * Fields appended to Medusa defaults for product detail queries.
 * Uses `*` prefix to add relations without replacing Medusa's built-in defaults.
 *
 * Missing from Medusa defaults: *categories
 * Mercur custom links: *seller
 */
declare const PRODUCT_DETAIL_FIELDS = "*seller,*categories,*shipping_profile,-variants";
declare const PRODUCT_DETAIL_QUERY: {
    readonly fields: "*seller,*categories,*shipping_profile,-variants";
};

export { PRODUCT_DETAIL_FIELDS as P, type TabDefinition as T, PRODUCT_DETAIL_QUERY as a, defineTabMeta as d };
