import type { ApiClient } from './api-context'; export interface AttributeClassSection { key: string; label?: string; fields: string[]; } export interface AttributeClass { key: string; label?: string; sections: AttributeClassSection[]; } /** * Resolves the attribute classes of the record's category and its parents. * Returns [] when the model serves no classes or the category is empty. */ export declare function resolveAttributeClasses(api: ApiClient, model: string, id: string): Promise; /** Test hook: forget cached category lookups. */ export declare function resetAttributeClassCache(): void; /** * The classes a saved record already carries by its own data: a class whose * section fields hold a value in the record. Its fields stay visible even when * the category lacks the class (a tire with a spec sheet but no category, or a * category the org has not tagged yet) — hiding a class must never hide data * that exists. Field keys are matched as served, bare or `.`. */ export declare function classesCarriedByRecord(meta: { attribute_classes?: AttributeClass[]; fields?: { key: string; }[]; } | null | undefined, record: Record | null | undefined): string[]; /** * The classes that apply to the form: those of its current category plus * those the saved record carries by its data (classesCarriedByRecord). `meta` * is the modal metadata; `fields` its field list (to find the class field's * ref). `record` is the record as loaded (null on create). */ export declare function useAttributeClasses(api: ApiClient, meta: { attribute_classes?: AttributeClass[]; attribute_class_field?: string; fields?: { key: string; ref?: string; }[]; } | null | undefined, formValues: Record, record?: Record | null): string[]; //# sourceMappingURL=attribute-classes.d.ts.map