import { FieldValues, FieldPath, UseFormReturn } from 'react-hook-form'; interface TabDefinition { /** 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[]; /** Predicate to conditionally show/hide this tab at runtime */ isVisible?: (form: UseFormReturn) => boolean; } /** * Helper to declare tab metadata on a component with type safety. * * Usage: * ```ts * const MyTab = () => { ... } * MyTab._tabMeta = defineTabMeta({ * id: "details", * labelKey: "products.create.tabs.details", * validationFields: ["title", "handle"], * }) * ``` */ declare const defineTabMeta: (meta: TabDefinition) => TabDefinition; /** * Fields appended to Medusa defaults for product detail queries. * Uses `*` prefix to add relations without replacing Medusa's built-in defaults. * * Mercur links surfaced here: * - `sellers` — product_seller link * - `scoped_attributes` — product-scoped inline attributes (read-only link) * - `product_attribute_values` — product-level linked attribute values (the * `product_attribute_value_link` pivot; SPEC-014 — NOT `attribute_values`, * which is not a relation on `product`). The enricher reads * `product_attribute_values.attribute(.values)` to build the unified * `product.attributes[]` array (selected `values` + full `all_values`). * * NOTE: native `*options` is intentionally NOT requested — on the 2.16 * options-preview build the product → options populate crashes the remote * joiner ("Cannot resolve alias path \"variants\"" / `expandDotPaths`). Axis * options + `is_exclusive` must be read from the `product_option` side. */ declare const PRODUCT_DETAIL_FIELDS = "*images,*categories,*sellers,-variants,*scoped_attributes,*scoped_attributes.values,*product_attribute_values,*product_attribute_values.attribute,*product_attribute_values.attribute.values"; declare const PRODUCT_DETAIL_QUERY: { readonly fields: "*images,*categories,*sellers,-variants,*scoped_attributes,*scoped_attributes.values,*product_attribute_values,*product_attribute_values.attribute,*product_attribute_values.attribute.values"; }; export { PRODUCT_DETAIL_FIELDS as P, type TabDefinition as T, PRODUCT_DETAIL_QUERY as a, defineTabMeta as d };