import { Response, Request } from 'express';
import { RenderTableListResponse } from './types.d.js';
import { StoredReportData, UserReportData, RequestedReport, RequestStatus } from '../../types/UserReports.js';
import { FilterValue } from '../_filters/types.d.js';
import { Services } from '../../types/Services.d.js';
import { AsyncReportUtilsParams } from '../../types/AsyncReportUtils.js';

declare const setDataFromStatus: (status: RequestStatus, reportsData: UserReportData) => {
    timestamp: string;
    href: string | undefined;
};
declare const renderList: ({ res, reportsData, maxRows, filterFunction, type, }: {
    res: Response;
    reportsData: StoredReportData[];
    maxRows?: number;
    filterFunction: (report: UserReportData) => boolean;
    type: "requested" | "viewed";
}) => Promise<RenderTableListResponse>;
declare const updateExpiredStatus: ({ req, res, services }: AsyncReportUtilsParams) => Promise<boolean>;
declare const initUserReports: ({ services, res, maxRows, }: {
    services: Services;
    res: Response;
    maxRows?: number;
}) => Promise<{
    requestedReports: RenderTableListResponse;
    viewedReports: RenderTableListResponse;
    bookmarks: {
        head: {
            emptyMessage?: string;
            href?: string;
        };
        tableData: {
            rows: ({
                html: string;
                classes?: never;
            } | {
                html: string;
                classes: string;
            })[][];
            head: {
                text: string;
                classes: string;
            }[];
        };
        total: {
            amount: number;
            shown: number;
            max: number;
        };
        csrfToken: string;
        type: string;
    } | undefined;
}>;
declare const updateLastViewed: ({ req, services, reportStateData, userId, filters, }: {
    req: Request;
    services: Services;
    reportStateData: RequestedReport;
    userId: string;
    filters: FilterValue[];
}) => Promise<void>;
declare const _default: {
    renderList: ({ res, reportsData, maxRows, filterFunction, type, }: {
        res: Response;
        reportsData: StoredReportData[];
        maxRows?: number;
        filterFunction: (report: UserReportData) => boolean;
        type: "requested" | "viewed";
    }) => Promise<RenderTableListResponse>;
    updateExpiredStatus: ({ req, res, services }: AsyncReportUtilsParams) => Promise<boolean>;
    initUserReports: ({ services, res, maxRows, }: {
        services: Services;
        res: Response;
        maxRows?: number;
    }) => Promise<{
        requestedReports: RenderTableListResponse;
        viewedReports: RenderTableListResponse;
        bookmarks: {
            head: {
                emptyMessage?: string;
                href?: string;
            };
            tableData: {
                rows: ({
                    html: string;
                    classes?: never;
                } | {
                    html: string;
                    classes: string;
                })[][];
                head: {
                    text: string;
                    classes: string;
                }[];
            };
            total: {
                amount: number;
                shown: number;
                max: number;
            };
            csrfToken: string;
            type: string;
        } | undefined;
    }>;
    updateLastViewed: ({ req, services, reportStateData, userId, filters, }: {
        req: Request;
        services: Services;
        reportStateData: RequestedReport;
        userId: string;
        filters: FilterValue[];
    }) => Promise<void>;
};

export { _default as default, initUserReports, renderList, setDataFromStatus, updateExpiredStatus, updateLastViewed };
