import { ISortServiceArrayValues, ISortServiceValues } from "@hmcts/opal-frontend-common/services/sort-service/interfaces"; import { SortableValuesType } from "@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/types"; import * as i0 from "@angular/core"; export declare class SortService { /** * Sorts an array of objects based on a specified key and sort type. * * @param array - The array of objects to be sorted. Each object should implement the `ISortServiceValues` interface. * @param config - The configuration object containing the key to sort by and the sort type (ascending or descending). * @returns The sorted array of objects. * * @remarks * - If the input array is not an array or the config key is not provided, the original array is returned. * - The `sortType` can be either 'ascending' or 'descending'. * * @example * ```typescript * const array = [ * { name: 'Alice', age: 30 }, * { name: 'Bob', age: 25 }, * ]; * const config = { key: 'age', sortType: 'ascending' }; * const sortedArray = getObjects(array, config); * // sortedArray will be: * // [ * // { name: 'Bob', age: 25 }, * // { name: 'Alice', age: 30 }, * // ] * ``` */ private sortObjectArray; /** * Sorts an array of objects in ascending order based on the specified key. * * @param array - The array of objects to be sorted. * @param key - The key of the object property to sort by. * @returns The sorted array of objects. */ sortObjectArrayAsc(array: ISortServiceValues[] | null, key: string): ISortServiceValues[] | null; /** * Sorts an array of objects in descending order based on the specified key. * * @param array - The array of objects to be sorted. Each object should implement the ISortServiceValues interface. * @param key - The key of the object property to sort by. * @returns The sorted array of objects in descending order. */ sortObjectArrayDesc(array: ISortServiceValues[] | null, key: string): ISortServiceValues[] | null; /** * Sorts an array of values in ascending order. * * @param array - The array of values to be sorted. * @returns The sorted array in ascending order. */ arraySortAsc(array: ISortServiceArrayValues): ISortServiceArrayValues; /** * Sorts an array of values in descending order. * * @param array - The array of values to be sorted. * @returns The sorted array in descending order. */ arraySortDesc(array: ISortServiceArrayValues): ISortServiceArrayValues; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }