import '../../../../utils/index.mjs';
import { THROTTLE_TIME } from '../../../../constant/index.mjs';
import { buildProps, definePropType } from '../../../../utils/props/runtime.mjs';

"use strict";
const treeSearchOperateWayType = ["modal", "drawer", "none"];
const treeSearchProps = buildProps({
  /**
   * @description input的value
   */
  searchValue: {
    type: String
  },
  /**
   * @description tree-operate操作栏的下拉菜单是否打开(用于如果展开的话，tree-operate不用隐藏)
   */
  operateDropdownOpen: {
    type: Boolean,
    default: false
  },
  /**
   * @description loading
   */
  loading: {
    type: Boolean,
    default: false
  },
  /**
   * @description 节流延时
   */
  throttleTime: {
    type: Number,
    default: THROTTLE_TIME
  },
  /**
   * @description 是否显示头部add按钮
   */
  isShowAddBtn: {
    type: Boolean,
    default: true
  },
  /**
   * @description tree的数据
   */
  treeData: {
    type: definePropType(Array),
    default: () => []
  },
  /**
   * @description 替换 treeNode 中 title,key,children 字段为 treeData 中对应的字段
   */
  fieldNames: {
    type: definePropType(Object),
    default: () => ({ children: "children", title: "title", key: "key" })
  },
  /**
   * @description  弹窗是否可见
   */
  open: {
    type: Boolean,
    default: false
  },
  /**
   * @description 新增和编辑显示哪种弹窗（模态框/抽屉/自定义）
   */
  operateWay: {
    type: String,
    values: treeSearchOperateWayType,
    default: "modal"
  },
  /**
   * @description LlModal的组件配置
   */
  modalConfigProps: {
    type: definePropType(Object)
  },
  /**
   * @description LlDrawer的组件配置
   */
  drawerConfigProps: {
    type: definePropType(Object)
  },
  /**
   * @description tree展开的key
   */
  expandedKeys: {
    type: definePropType(Array)
  },
  /**
   * @description 头部搜索change
   */
  onSearchInputChange: {
    type: Function,
    default: (v) => !!v
  }
});
const treeSearchEmits = {
  clickAdd: () => true,
  // 点击头部新增按钮
  cancel: () => true,
  // 弹窗取消按钮事件
  ok: () => true,
  // 弹窗确定按钮事件
  close: () => true,
  // 弹窗的close
  expand: (expandedKeys, data) => expandedKeys || data,
  // tree的expand
  select: (selectedKeys, e) => selectedKeys || e
  // tree的select
};
const treeSearchEmits1 = [
  "cancel",
  "cancel",
  "ok",
  "close",
  "expand",
  "select"
];

export { treeSearchEmits, treeSearchEmits1, treeSearchOperateWayType, treeSearchProps };
//# sourceMappingURL=tree-search.mjs.map
