import type { CascaderProps } from "antd/es/cascader";
import type { FC } from "react";

/**
 * 组件属性
 */
export interface BasicCascaderProps extends Omit<CascaderProps, "fieldNames"> {
  /** 树形数据 label 字段，默认 name */
  nameKey?: string;
  /** 树形数据 value 字段，默认 id */
  idKey?: string;
  /** 树形数据 children 字段，默认 children */
  childrenKey?: string;
  /** @deprecated 已弃用，请使用 getNodePathsIsIncludeOneself */
  onGetNodePathsIsIncludeOneself?: boolean;
  /** 决定 onGetNodePaths 是否包含自身节点，默认 true */
  getNodePathsIsIncludeOneself?: boolean;
  /** 获取父级节点 */
  onGetNodePaths?: (nodes: Record<string, any>[]) => void;
  /** 占位符 */
  placeholder?: string;
  /** 控制只能选择到第几级 */
  level?: number;
  /** 获取数据 */
  onGetData?: (data: Record<string, any>[], processedData: Record<string, any>[]) => void;
}

/**
 * 基础级联组件
 */
declare const BasicCascader: FC<BasicCascaderProps>;

export default BasicCascader;
