interface IsExistenceDuplicateSelectionOptions<T> {
  /** 需要检查重复项的目标数组 */
  data: T[];
  /** 用于去重判断的对象属性名 */
  key: keyof T | string;
  /** 可选的错误提示信息 */
  message?: string;
}

/**
 * 检查数组中是否存在重复项的函数
 */
interface IsExistenceDuplicateSelectionFunction {
  <T>(options: IsExistenceDuplicateSelectionOptions<T>): Promise<void>;
}

/**
 * 检查数组中是否存在重复项
 */
export default function useIsExistenceDuplicateSelection(): {
  isExistenceDuplicateSelection: IsExistenceDuplicateSelectionFunction;
};
