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

"use strict";
const getKeyValueItem = () => ({
  key: null,
  value: null,
  guid: guid()
});
const keyValueProps = buildProps({
  value: {
    type: definePropType(Array),
    default: () => [{ key: null, value: null }]
  },
  loading: {
    type: Boolean,
    default: false
  },
  disabled: {
    type: Boolean,
    default: false
  },
  keyLabel: {
    type: String,
    default: ""
  },
  valueLabel: {
    type: String,
    default: ""
  },
  addText: {
    type: String,
    default: "\u6DFB\u52A0"
  },
  keyValueType: {
    type: definePropType(String),
    default: "doubt"
  },
  keyType: {
    type: definePropType(Object),
    default: () => ({
      type: "input",
      placeholder: "\u8BF7\u8F93\u5165Key"
    })
  },
  keyTypes: {
    type: definePropType(Array),
    default: () => []
  },
  valueType: {
    type: definePropType(Object),
    default: () => ({
      type: "input",
      placeholder: "\u8BF7\u8F93\u5165Value"
    })
  },
  disabledValue: {
    type: definePropType(Array),
    default: () => []
  },
  disabledKey: {
    type: definePropType(Array),
    default: () => []
  },
  disabledDelete: {
    type: definePropType(Array),
    default: () => []
  },
  disabledAdd: {
    type: Boolean,
    default: false
  },
  validate: {
    type: Boolean,
    default: false
  },
  keepLast: {
    type: Boolean,
    default: true
  }
});
const keyValueEmits = {
  change: (value) => !!value,
  add: (params) => !!params,
  delete: (index) => typeof index === "number",
  "update:value": (value) => !!value
};

export { getKeyValueItem, keyValueEmits, keyValueProps };
//# sourceMappingURL=key-value.mjs.map
