'use strict';

require('../../../../utils/index.js');
var data = require('../../../../utils/data.js');
var runtime = require('../../../../utils/props/runtime.js');

"use strict";
const getKeyValueItem = () => ({
  key: null,
  value: null,
  guid: data.guid()
});
const keyValueProps = runtime.buildProps({
  value: {
    type: runtime.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: runtime.definePropType(String),
    default: "doubt"
  },
  keyType: {
    type: runtime.definePropType(Object),
    default: () => ({
      type: "input",
      placeholder: "\u8BF7\u8F93\u5165Key"
    })
  },
  keyTypes: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  valueType: {
    type: runtime.definePropType(Object),
    default: () => ({
      type: "input",
      placeholder: "\u8BF7\u8F93\u5165Value"
    })
  },
  disabledValue: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  disabledKey: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  disabledDelete: {
    type: runtime.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
};

exports.getKeyValueItem = getKeyValueItem;
exports.keyValueEmits = keyValueEmits;
exports.keyValueProps = keyValueProps;
//# sourceMappingURL=key-value.js.map
