{"version":3,"file":"types2.mjs","sources":["../../../../../../../packages/components/tree/src/types.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport type {\n  AntTreeNodeCheckedEvent as CheckEventOrigin,\n  TreeDataItem,\n} from 'ant-design-vue/es/tree/Tree'\n\nexport const treeProps = {}\n\nexport type TreeProps = ExtractPropTypes<typeof treeProps>\n\nexport type Recordable<T = any> = Record<string, T>\nexport type Record<K extends keyof any, T> = {\n  [P in K]: T\n}\n\nexport interface TreeActionItem {\n  render: (record: Recordable) => any\n  show?: boolean | ((record: Recordable) => boolean)\n}\n\nexport interface TreeItem extends TreeDataItem {\n  icon?: any\n}\n\nexport interface FieldNames {\n  children?: string\n  title?: string\n  key?: string\n  id?: string\n  pid?: string\n}\n\nexport type Keys = (string | number)[]\nexport type CheckKeys =\n  | (string | number)[]\n  | {\n      checked: (string | number)[]\n      halfChecked: (string | number)[]\n    }\n\nexport interface TreeActionType {\n  checkAll: (checkAll: boolean) => void\n  expandAll: (expandAll: boolean) => void\n  setExpandedKeys: (keys: Keys) => void\n  getExpandedKeys: () => Keys\n  setSelectedKeys: (keys: Keys) => void\n  getSelectedKeys: () => Keys\n  setCheckedKeys: (keys: CheckKeys) => void\n  getCheckedKeys: () => CheckKeys\n  filterByLevel: (level: number) => void\n  insertNodeByKey: (opt: InsertNodeParams) => void\n  insertNodesByKey: (opt: InsertNodeParams) => void\n  deleteNodeByKey: (key: string) => void\n  updateNodeByKey: (key: string, node: TreeDataItem) => void\n  setSearchValue: (value: string) => void\n  getSearchValue: () => string\n}\n\nexport interface InsertNodeParams {\n  parentKey: string | null\n  node: TreeDataItem\n  list?: TreeDataItem[]\n  push?: 'push' | 'unshift'\n}\n\nexport interface ContextMenuOptions {\n  icon?: string\n  styles?: any\n  items?: ContextMenuItem[]\n}\nexport interface ContextMenuItem {\n  label: string\n  icon?: string\n  disabled?: boolean\n  handler?: Fn\n  divider?: boolean\n  children?: ContextMenuItem[]\n}\nexport interface Fn<T = any, R = T> {\n  (...arg: T[]): R\n}\nexport type CheckEvent = CheckEventOrigin\n"],"names":[],"mappings":"AAAY,MAAC,SAAS,GAAG;;;;"}