import type { FC } from "react";
import type { BasicCascaderProps } from "../Basic";

export interface AreaCascaderItem {
  value: string;
  label: string;
  children: AreaCascaderItem[];
}

/**
 * 组件属性
 */
export interface AreaCascaderProps extends Omit<BasicCascaderProps, "options" | "placeholder" | "nameKey" | "idKey" | "childrenKey" | "onGetNodePaths" | "onGetData"> {
  /** 获取父级节点 */
  onGetNodePaths?: (nodes: AreaCascaderItem[]) => void;
  /** 获取数据 */
  onGetData?: (data: AreaCascaderItem[], processedData: AreaCascaderItem[]) => void;
}

/**
 * 属地级联组件
 */
declare const AreaCascader: FC<AreaCascaderProps>;

export default AreaCascader;
