import { ListingAdapter } from "../tokens/listing-adapter.token"; export interface ListingRequestContext { userId: string; isCopilot: boolean; selectedPeriod?: { startDate: string; endDate: string; isEntireFlightPeriod?: boolean; }; toQueryString: (params: Record) => string; tabId?: string; } export interface ListingNavCommand { type: "NAVIGATE"; path: any[]; queryParams?: Record; } export interface ListingNavContext { go: (cmd: ListingNavCommand) => void; ensureBreadcrumbs: () => string | null; buildListingPageFilterParams: () => Record; tabId: string; } export interface ListingFlowCommand { type: ListingFlowType; tabId?: string; queryParams?: Record; payload?: any; } export interface ListingFlowContext { open: (cmd: ListingFlowCommand) => void; buildListingPageFilterParams: () => Record; tabId: string; } export type ListingFlowType = "ANNA" | "EOS"; export interface TabDefinition { id: string; title: string; route: string; headers: any[]; tableClass?: string; flowType?: ListingFlowType; adapterMethod?: keyof ListingAdapter; requestMapper: (ctx: ListingRequestContext) => any; mapRow?: (row: any) => any; rowAction: (row: any, nav: ListingNavContext) => void; addAction: (flow: ListingFlowContext) => void; expiryCard?: { getIds: () => Array; wasTakeActionClicked: () => boolean; resetTakeActionClicked: () => void; }; }