<!-- TODO数据引用也用这个-->
<template>
  <sd-value-picker
    ref="picker"
    :modal-props="{ class: single ? $style.singleWrapper : $style.relationPicker, width: 1400 }"
    v-bind="$props"
    :single-column="true"
    v-on="$listeners"
  >
    <template v-slot="scope">
      <SdPickerLinkData v-bind="{ ...$props, ...scope }" />
    </template>
  </sd-value-picker>
</template>

<script>
import components from './_import-components/sd-relation-picker-import'
import pickerMixinInternal from './sd-picker/picker-mixin-internal'
import SdPickerLinkData from './sd-picker/sd-picker-link-data.vue'
export default {
  name: 'SdRelationPicker',
  metaInfo: {
    title: '',
  },
  components: { SdPickerLinkData, ...components },
  mixins: [pickerMixinInternal],
  props: {
    formId: {
      type: String,
      required: true,
    },
    formListId: {
      type: String,
      default: undefined,
    },
    isFlow: {
      type: Boolean,
      default: false,
    },
    customValues: {
      type: [String, Object],
      default: () => ({}),
    },
  },
  data() {
    return {}
  },
  methods: {},
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
.single-wrapper {
  :global .ant-transfer-list {
    padding-top: 0;
    :global .ant-card-body {
      padding-top: 0;
    }
  }
}
.relationPicker {
  :global .ant-transfer-list-header {
    display: none;
  }
  :global .ant-transfer-list {
    padding-top: 0px;
  }
}
</style>
