import { ActorActivityWithUser, ApprovalActionType, ApprovalRuleActor, AttributeType, BillActivity, Class, Criteria, FetchState, FetchStateAndError, ID, RealTimeApprovalDetailLocalData, StepOperatorType, User, UserAndRole } from '@zeniai/client-epic-state'; import { NonUserOption } from '../billPay/billPaySetUp/components/formElements/UserMultiSelect'; export declare const getAllSelectedRealTimeApprovers: (stepsData: StepFormData[]) => string[]; export declare const getAllSelectedNonUsers: (stepsData: StepFormData[]) => string[]; export declare const filterSignedInUserFromApprovers: (approvers: User[], signedInUserId: ID) => User[]; export declare const getFilteredRealTimeApprovalUsers: (approvers: User[], selectedApprovers: ID[]) => User[]; export declare const getNonUserRealTimeApprovalOptions: (selectedNonUsers: string[], currentSelected: ID[], attributes: AttributeType[], signedInUserId: ID, isAdmin: boolean, vendorOwnerId?: ID, attributeSubTypeToUserIdMapping?: Record) => NonUserOption[]; export declare const isApprovedOrRejected: (actorActivityWithUser: ActorActivityWithUser[]) => number; export declare const isRejectedBill: (actorActivityWithUser: ActorActivityWithUser[]) => boolean; export declare const isApprovedBill: (actorActivityWithUser: ActorActivityWithUser[]) => boolean; export declare const isNotificationTimeAvailable: (step: StepFormData) => boolean; /** * Approval Rules 3.0 — canonical amount-matching predicate. * * Returns 'true' when 'amount' falls inside the rule's amount * criterion using the wire's inclusive 'gte' / 'lte' semantics. * Either bound may be absent for a one-sided rule: * - 'greater_than' (only 'min') → matches any amount >= min. * - 'less_than' (only 'max') → matches any amount <= max. * - 'range' (both) → matches min <= amount <= max. * * A rule with no criteria or no amount criterion does not match. * * Centralised here because three sites need to evaluate the same * question — the activity timeline (this file) and the two detail * pages 'EditableBillDetailPage' / 'EditReimbursementDetailPage'. * Earlier the detail pages diverged (exclusive '<' on min, bail on * 'min == null') and silently mismatched the activity timeline at * the boundary and dropped 'less_than'-only rules entirely. */ export declare const doesAmountMatchRuleCriteria: (criteria: Criteria[] | null | undefined, amount: number) => boolean; export declare const getBillActivity: (activities: BillActivity[], amount: number) => BillActivity | undefined; export interface RealTimeApprovalData { allAccountingClass: Class[]; allApprovers: UserAndRole[]; approvalListFetchState: FetchState; entityApprovalId: ID; filteredAttributes: AttributeType[]; isAdmin: boolean; isRealTimeApproverEditMode: boolean; showRealTimeApproval: boolean; attributeSubTypeToUserIdMapping?: Record; realTimeApprovalSaveStatus?: FetchStateAndError; signedInUserId?: ID; vendorOwnerId?: ID; onSaveRealTimeApprovals: (realTimeApprovalLocalData: RealTimeApprovalDetailLocalData) => void; updateEditMode: (isEdit: boolean) => void; } export interface StepFormData { action: ApprovalActionType; actors: StepActorsFormData; actorsActivity: ActorActivityWithUser[]; operator: StepOperatorType; displayPendingApproverAsAdmin?: boolean; isEditMode?: boolean; isNewlyAdded?: boolean; nonUserActors?: ApprovalRuleActor[]; showSodAdminLabel?: boolean; } export interface StepActorsFormData { allNonUsers: NonUserOption[]; allUsers: User[]; selectedNonUsers: NonUserOption[]; selectedUsers: User[]; } export type ActivityTextWithColor = { text: string; textColor: string; };