/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import type { Collection, CollectionField } from '@nocobase/flow-engine';
/**
 * 从 collection 中获取所有 sort 类型的字段
 * @param collection - 集合对象
 * @returns 排序字段数组
 */
export declare function getSortFields(collection: Collection | undefined): CollectionField[];
export declare function getSortField(collection: Collection | undefined, fieldName?: string | null): CollectionField | undefined;
export declare function hasSortField(collection: Collection | undefined, fieldName?: string | null): boolean;
/**
 * 获取 collection 中第一个可用的 sort 字段
 * @param collection - 集合对象
 * @returns 第一个排序字段，如果没有则返回 undefined
 */
export declare function getFirstSortField(collection: Collection | undefined): CollectionField;
/**
 * 将 sort 字段转换为选项格式
 * @param fields - 字段数组
 * @returns 选项数组
 */
export declare function convertFieldsToOptions(fields: CollectionField[]): {
    label: any;
    value: any;
    disabled: any;
}[];
/**
 * 检查 collection 是否支持拖拽排序
 * @param collection - 集合对象
 * @returns 如果 collection 有 sort 字段则返回 true
 */
export declare function supportsDragSort(collection: Collection | undefined): boolean;
