'use strict';

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

"use strict";
const typeRules = [
  {
    trigger: ["blur", "change"],
    message: "\u6B64\u5B57\u6BB5\u662F\u5FC5\u9700\u7684",
    validator: async (_rule, value) => {
      if (!value) {
        return Promise.reject(new Error("\u6B64\u5B57\u6BB5\u662F\u5FC5\u9700\u7684"));
      } else {
        return Promise.resolve();
      }
    }
  }
];
const formOptions = {
  layout: "horizontal",
  labelAlign: "left"
};
const formColumns = [
  {
    key: "other",
    labelCol: {
      span: 24
    }
  }
];
const keyValueItemProps = runtime.buildProps({
  disabled: {
    type: Boolean,
    default: false
  },
  values: {
    type: runtime.definePropType(Array),
    default: () => [
      {
        key: null,
        value: null,
        guid: ""
      }
    ]
  },
  disabledValue: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  disabledKey: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  disabledDelete: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  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"
    })
  },
  value: {
    type: runtime.definePropType(Object),
    default: () => ({
      key: "",
      value: "",
      guid: ""
    })
  },
  idx: {
    type: Number,
    required: true
  },
  keyValueTypeDict: {
    type: Object,
    default: () => ({})
  },
  keepLast: {
    type: Boolean,
    default: false
  }
});
const keyValueItemEmits = {
  delete: () => true,
  change: () => true,
  "update:value": (value) => !!value
};

exports.formColumns = formColumns;
exports.formOptions = formOptions;
exports.keyValueItemEmits = keyValueItemEmits;
exports.keyValueItemProps = keyValueItemProps;
exports.typeRules = typeRules;
//# sourceMappingURL=key-value-item.js.map
