import { type PamirsDepartment, PamirsDepartmentServiceToken } from '@oinone/kunlun-engine'; import type { OioTreeNode } from '@oinone/kunlun-shared'; import { SPI } from '@oinone/kunlun-spi'; import type { ComputedRef, Ref } from 'vue'; import { type TreeInitOptions, type TreeState, type TreeStateLoadFunction, type TreeStateProps, useTreeState } from '../../quick-utils'; export interface DepartmentTreeInstance { state: Ref>; filterData: ComputedRef[]>; checkedAll: ComputedRef; halfCheckedAll: ComputedRef; init(options?: Partial): Promise>; } export function useDepartmentTree(props?: TreeStateProps & { load?: TreeStateLoadFunction }) { return useTreeState({ service: SPI.RawInstantiate(PamirsDepartmentServiceToken)!, props, load: props?.load }); }