import { DateTime } from 'luxon';
export declare const formatDateFormat: (d: Date, dateFormat?: string) => string;
/**
 *
 * @param {*} accessGroup
 * @returns
 */
export declare const getAccess: (userDetails: any, accessGroup: any) => boolean;
/**
 * Transform Data to DHIS2 format
 * @param {*} values
 * @param {*} mappings
 * @param {*} type
 * @param {String} key
 * @param {Object} dataset
 * @returns
 */
export declare const transformDataValues: (values: any, mappings: any, key: string, dataSet: string, type?: string) => ({
    dataElement: any;
    value: any;
    categoryOptionCombo: any;
    period: any;
    orgUnit: any;
    attributeOptionCombo: any;
    storedBy: any;
} | undefined)[] | ({
    event: any;
    dataValues: ({
        attribute: any;
        value: any;
    } | undefined)[];
} | undefined)[] | ({
    trackedEntityInstance: any;
    enrollment: any;
    attributes: ({
        attribute: any;
        value: any;
    } | undefined)[];
} | undefined)[];
/**
 * Get data from resolved properties
 * @param {*} values
 * @param {*} resolvedProperties
 */
export declare const getResolvedProperties: (values: any, resolvedProperties: any) => any;
/**
 *
 * @param {*} url datastore url
 * @param {*} baseUrl dhis2 url
 * @param {*} headers
 * @param {*} currentUser
 * @param {*} values data
 * @param {*} type
 * @param {*} excludedProperties
 * @param {*} resolvedProperties
 * @param {*} dataSetProperties
 * @param {*} datastore store for data storage, default is alkuistore
 * @param {*} setupStore store used for setup information, default is setup
 * @param {*} mappingsStore store used for mappings, default is mappings
 * @returns
 */
export declare const saveToDhis2: (url: string, baseUrl: string, headers: any, currentUser: any, values: any, appId: string, type: string, excludedProperties: any, resolvedProperties: any, dataSetProperties: any, _datastore?: string | undefined, setupStore?: string, mappingsStore?: string) => Promise<{
    data: {
        dataMap: any[];
        tracker: any;
        aggregate: {
            dataValues: any;
        };
    };
    status: {
        tracker: any;
        aggregate: any;
    };
} | {
    data: {
        dataMap: any[];
        tracker: any;
        aggregate?: undefined;
    };
    status: {
        tracker: any;
        aggregate?: undefined;
    };
}>;
/**
 * Map DHIS Uids to Data
 * @param {*} values
 * @param {*} key
 */
export declare const mapUids: (values: any[], key: string) => any[];
/**
 * Create Enrollments
 * @param {*} currentUser
 * @param {*} orgUnit
 * @param {*} dueDate
 * @param {*} dataValues
 * @param {*} config
 */
export declare const createEnrollments: (currentUser: any, orgUnit: string, dueDate: Date, dataValues: any, mappings: any[], config: any) => {
    event: any;
    orgUnit: string;
    program: any;
    programStage: any;
    storedBy: any;
    status: string;
    dueDate: string;
    eventDate: DateTime;
    completedDate: DateTime;
    dataValues: any;
}[];
/**
 * Create DataSet DataValues
 * @param {*} currentUser
 * @param {*} orgUnit
 * @param {*} dueDate
 * @param {*} dataValues
 * @param {*} config
 */
export declare const createDataSetValues: (currentUser: any, orgUnit: string, dueDate: Date, dataValues: any, config: any, dataSetFilter: any) => {
    orgUnit: string;
    dataSet: any;
    attributeOptionCombo: any;
    storedBy: any;
    period: string;
    completedDate: DateTime;
    dataValues: any;
} | undefined;
/**
 * Get DHIS2 organisationUnits
 * @param {*} url
 * @param {*} orgUnits
 */
export declare const getOrganisationUnits: (url: string, orgUnits: string) => Promise<{
    data: any;
    loading: boolean;
    error: unknown;
}>;
/**
 * Get symbols
 * @param {*} currentUser
 * @param {*} key
 */
export declare const getSymbolValues: (currentUser: any, key: string) => any;
/**
 * Get DHIS2 User Groups and Roles
 * @param {*} url
 */
export declare const getUser: (url: string) => {
    data: any;
    loading: any;
    error: any;
};
/**
 * Get valid data with correct grouping
 * @param {*} data
 * @param {*} group
 * @param {*} key
 */
export declare const getOrgUnitsWithGroup: (data: any[], group: string, key: string, check: string) => any[];
/**
 * Get valid data without specified grouping
 * @param {*} data
 * @param {*} group
 * @param {*} key
 */
export declare const getOrgUnitsWithoutGroup: (data: any[], group: string, key: string, check: string) => any[];
/**
 * Validate group
 * @param {*} groups
 * @param {*} group
 * @param {*} key
 */
export declare const isGroupValid: (groups: any, group: any, key: string) => any;
/**
 * Check if user has all rights/authorities
 * @param {*} currentUser
 */
export declare const userIsSuperAdmin: (currentUser: any, appId: string) => {
    isSuperAdmin: any;
    isAdmin: any;
    isUser: any;
};
/**
 * Check if user has access
 * @param {*} user
 * @param {*} userGroups
 */
export declare const getUserAccess: (user: any, userGroups: any) => {
    isSuperAdmin: boolean;
    canCreateOrUpdate: boolean;
    canViewOnly: boolean;
    canApprove: boolean;
    isAdmin: boolean;
    isUser: boolean;
} & {
    canViewOnly: boolean;
    canCreateOrUpdate: boolean;
    canApprove: boolean;
    isAdmin: boolean;
    isUser: boolean;
} & {
    isSuperAdmin: any;
};
/**
 * Check if user is admin or assessment admin
 * @param {*} user
 * @param {*} userGroup
 */
export declare const userIsAdmin: (user: any, userGroup: any) => Promise<{
    isSuperAdmin: boolean;
    isAdmin: boolean;
}>;
/**
 * Filter data by parameter
 * @param { array } data Data to search from
 * @param { string } key Key used to do match
 * @param { string } search Word to search
 */
export declare const filterData: (data: any, key: string, search: string) => any[];
/**
 *
 Create events data payload for DHIS2 Event program without registration
**/
export declare const createDataValues: (currentData: any, event: any) => any;
/**
 * Map data to DHIS2 Format
 * @param {*} data
 */
export declare const createValues: (data: any) => any[];
/**
 * Get flat path from array of flat paths
 * @param {*} event
 * @param {*} pathValue
 */
export declare const getArrayPath: (event: any, pathValue: any) => any;
/**
 * Map data to DHIS2 Format
 * @param {*} data
 */
export declare const createEvent: (data: any) => any[];
/**
 * Send notifications
 * @param {*} data
 * @param {*} sendType
 * @param {*} sender
 * @param {*} api
 */
export declare const sendMessage: (data: any, sendType: string, sender: any, api: string) => {
    programMessages: any;
    messageConversations: any[];
};
/**
 * Create a DHIS2 message or notification
 * @param {*} recipients
 * @param {*} subject
 * @param {*} message
 * @param {*} event
 * @param {*} sendType
 * @returns
 */
export declare const createMessage: (recipients: any, subject: string, message: string, event: string, sendType?: string) => {
    recipients: {
        emailAddresses: any;
    };
    programStageInstance: {
        id: string;
    };
    deliveryChannels: string;
    subject: string;
    text: string;
    storeCopy: boolean;
};
/**
 Map DHIS2 data elements to actual data
**/
export declare const getMappings: (mappings: any, data: any, type: string, key: string) => any;
export declare const filterItemsX: (items: any, key: string, itemValue: string) => any;
/**
 * Get Data store namespace key values
 * @param {*} url
 * @param {*} headers
 * @param {*} namespace
 * @param {Object} q Query object
 */
export declare const getDataStoreValue: (url: string, headers: any, namespace: string, q: any) => Promise<any>;
/**
 * Get key values from the datastore
 * @param { namespace } namespace
 * @param {*} key
 **/
export declare const getDataStoreKey: (namespace: any, key: string) => Promise<any>;
/**
 * data accumulator for each sub component
 * @param {} value
 */
export declare const accumulatorSchema: (data: any) => any;
/**
 * Extract sub component data from main data
 * @param {} value
 */
export declare const extractData: (data: any[], items: any[]) => any[];
/**
 * compute the values for Goal and current status
 */
export declare const computeValues: (value: string) => 0 | 1 | 5 | 2 | 3 | 4;
/**
 * Compute label for different HIS components
 */
export declare const computeHisLabels: (data: any[], schemas: any[]) => any[];
/**
 * Filter data by key
 */
export declare const filterSchemaData: (data: any[], keySchema: string) => any[];
/**
 * Get DHIS2 Aggregate Data from mappings
 * @param {*} mappings
 * @param {*} values
 * @param {*} dataSet
 * @returns
 */
export declare const getAggregateData: (mappings: any[], values: any, dataSet: any) => ({
    dataElement: any;
    value: any;
    categoryOptionCombo: any;
    period: any;
    orgUnit: any;
    attributeOptionCombo: any;
    storedBy: any;
} | undefined)[];
/**
 * Get DHIS2 tracker attribute data from mappings
 * @param {*} values
 * @param {*} mappings
 * @returns
 */
export declare const getTrackerAttributeData: (values: any[], mappings: any[]) => ({
    trackedEntityInstance: any;
    enrollment: any;
    attributes: ({
        attribute: any;
        value: any;
    } | undefined)[];
} | undefined)[];
/**
 * Get DHIS2 tracker events data from mappings
 * @param {*} values
 * @param {*} key
 * @param {*} mappings
 * @returns
 */
export declare const getTrackerEventData: (values: any, key: string | number, mappings: any[]) => ({
    event: any;
    dataValues: ({
        attribute: any;
        value: any;
    } | undefined)[];
} | undefined)[];
/**
 * Get Resolved data value from values by path/property
 * @param {*} values
 * @param {*} d
 * @returns
 */
export declare const getResolvedDataValue: (values: any, d: any) => any;
export declare const hasUserGroupAccess: (selectedUserGroups: any[], userGroups: any) => {
    canViewOnly: boolean;
    canCreateOrUpdate: boolean;
    canApprove: boolean;
    isAdmin: boolean;
    isUser: boolean;
} | undefined;
export declare const hasRoleAccess: (userAuthorities: any) => any;
