import * as React from 'react'; import type { DefaultOptionType } from '..'; import type { InternalFieldNames } from '../Cascader'; import type { MultiValueType, SingleValueType } from '../interface'; import { toPathOptions } from '../utils/treeUtil'; import type { GetEntities } from './useEntities'; export default function useOptions(fieldNames: InternalFieldNames, options?: DefaultOptionType[]): [ mergedOptions: DefaultOptionType[], getPathKeyEntities: GetEntities, getValueByKeyPath: (pathKeys: React.Key[]) => MultiValueType, getPathOptions: (valueCells: SingleValueType) => ReturnType ];