import { SYNC_MSG_REL8N_NAME, } from "./sync-constants.mjs";
// #region SyncMode
export const SYNC_MODE_PUSH = 'push';
export const SYNC_MODE_PULL = 'pull';
export const SYNC_MODE_SYNC = 'sync';
export const SyncMode = {
    push: SYNC_MODE_PUSH,
    pull: SYNC_MODE_PULL,
    sync: SYNC_MODE_SYNC,
};
export const SYNC_MODE_VALID_VALUES = Object.values(SyncMode);
export function isValidSyncMode(mode) {
    return SYNC_MODE_VALID_VALUES.includes(mode);
}
// #endregion SyncMode
// #region SyncSagaFrameOrigin
export const SYNC_SAGA_FRAME_ORIGIN_SENDER = 'sender';
export const SYNC_SAGA_FRAME_ORIGIN_RECEIVER = 'receiver';
/**
 * if the frame was created by the original sender (the initiator of the sync
 * saga operation) or the other party, the "receiver" (the one responding).
 *
 * This is driven by looking at the latest value of `sagaFrame.data.n` value.
 */
export const SyncSagaFrameOrigin = {
    /**
     * The frame was created on the initial location that started the sync.
     */
    sender: SYNC_SAGA_FRAME_ORIGIN_SENDER,
    /**
     * The frame was created on the receiving end, which is either a physically
     * different location or is the logical "receiver" of an in-memory sync
     * execution.
     */
    receiver: SYNC_SAGA_FRAME_ORIGIN_RECEIVER,
};
export const SYNC_SAGA_FRAME_ORIGIN_VALID_VALUES = Object.values(SyncSagaFrameOrigin);
export function isValidSyncSagaFrameOrigin(sagaFrameOrigin) {
    return SYNC_SAGA_FRAME_ORIGIN_VALID_VALUES.includes(sagaFrameOrigin);
}
// #endregion Sync Ib, Data, Rel8ns, IbGib
//# sourceMappingURL=sync-types.mjs.map