import { OwnershipApplier } from './OwnershipApplier.js';
/**
 * Build the OwnershipApplier when (and only when) the durable ownership store is active.
 * Returns `null` for the in-memory store (nothing to apply). NEVER gates on the self id —
 * that was the boot-ordering bug. The caller schedules the boot tick + interval on a
 * non-null result.
 */
export function wireOwnershipApplier(deps) {
    if (!deps.durableOwnershipStore)
        return null;
    return new OwnershipApplier({
        reader: deps.reader,
        store: deps.durableOwnershipStore,
        selfMachineId: deps.getSelfMachineId, // getter — resolved per-tick, never captured stale
        scanLimit: deps.scanLimit,
        logger: deps.logger,
        now: deps.now,
    });
}
//# sourceMappingURL=ownershipApplierWiring.js.map