import { INDEX_RECORD_SYMBOL, IndexRecordContribution } from './types';
export interface KosIndexAwareOptions {
    /**
     * Per-item collection tag. May be:
     *
     *   - A static string.
     *   - A function called with the instance, returning the tag
     *     (heterogeneous case where one container holds items belonging
     *     to multiple collections, distinguished by some item property).
     *   - Undefined — the item resolves its collection from its
     *     `KosContext` (auto-walks the parent chain). When the item
     *     lives under a `@kosContainerIndexAware`-decorated container,
     *     that container has already written its declared collection
     *     onto its own context, so this resolves transparently with no
     *     per-item declaration needed.
     */
    collection?: string | ((self: any) => string | undefined);
    /**
     * Field names projected into the index record and watched for
     * change. Empty/absent means no CHANGED events are emitted; the
     * record still exposes `id`, `modelType`, and `collection`.
     */
    fields?: string[];
}
/**
 * Use TypeScript interface merging to attach the indexable contract
 * to your model class:
 *
 * ```ts
 * interface MyItemModelImpl extends KosIndexAware {}
 *
 * @kosModel("my-item-model")
 * @kosIndexAware({ collection: "items", fields: ["name"] })
 * class MyItemModelImpl implements IKosDataModel { ... }
 * ```
 *
 * Mirrors the `KosLoggerAware` / `KosContainerAware` pattern.
 */
export interface KosIndexAware {
    readonly [INDEX_RECORD_SYMBOL]: IndexRecordContribution;
}
/**
 * Class decorator that registers a model as a publisher of index
 * records.
 *
 * Reads `id` and `modelTypeId` off the instance at record-construction
 * time. Both are part of the standard kos-model surface — `id` from
 * `IKosIdentifiable`, `modelTypeId` from `@kosModel`. No author
 * duplication needed.
 *
 * @example Heterogeneous container — collection resolved per item
 * ```ts
 * interface VirtualMachineModelImpl extends KosIndexAware {}
 *
 * @kosModel("virtual-machine-model")
 * @kosIndexAware({
 *   collection: (self) => self.type,
 *   fields: ["name", "desc"],
 * })
 * class VirtualMachineModelImpl implements IKosDataModel { ... }
 * ```
 *
 * @example Homogeneous — collection declared on the container instead
 * ```ts
 * @kosModel("image-model")
 * @kosIndexAware({ fields: ["name"] })
 * class ImageModelImpl implements IKosDataModel { ... }
 *
 * @kosContainerIndexAware({ itemsProperty: "images", collection: "images" })
 * class ImageContainerModelImpl ...
 * ```
 *
 * @category KOS Model Decorator
 * @kosService core.indexing
 * @kosApiLevel 22
 */
export declare function kosIndexAware(options?: KosIndexAwareOptions): ClassDecorator;
//# sourceMappingURL=kos-index-aware.d.ts.map