import { defineComponent as i, computed as s, openBlock as c, createElementBlock as d, toDisplayString as u, createCommentVNode as m } from "vue";
import { isArray as y } from "lodash-unified";
const f = { key: 0 }, C = /* @__PURE__ */ i({
  name: "ApFieldSelectRead",
  __name: "read",
  props: {
    mode: {},
    class: {},
    style: {},
    emptyText: { default: "--" },
    customReadMode: {},
    defaultValue: {},
    notFoundContent: {},
    suffixIcon: {},
    itemIcon: {},
    size: {},
    bordered: { type: Boolean },
    showArrow: { type: Boolean },
    variant: {},
    maxCount: {},
    transitionName: {},
    choiceTransitionName: {},
    popupClassName: {},
    dropdownClassName: {},
    placement: {},
    status: {},
    children: {},
    listHeight: {},
    onMouseenter: {},
    onMouseleave: {},
    tabindex: {},
    onClick: {},
    onFocus: {},
    onBlur: {},
    onChange: {},
    onKeydown: {},
    onKeyup: {},
    onMousedown: {},
    onSelect: {},
    open: { type: Boolean },
    animation: {},
    direction: {},
    disabled: { type: Boolean },
    prefixCls: {},
    id: {},
    autofocus: { type: Boolean },
    getPopupContainer: {},
    virtual: { type: Boolean },
    dropdownMatchSelectWidth: {},
    placeholder: {},
    loading: { type: Boolean },
    prefix: {},
    clearIcon: {},
    allowClear: { type: Boolean },
    fieldNames: {},
    inputValue: {},
    searchValue: {},
    autoClearSearchValue: { type: Boolean },
    onDeselect: {},
    onActive: {},
    filterOption: {},
    filterSort: {},
    optionFilterProp: {},
    optionLabelProp: {},
    options: {},
    defaultActiveFirstOption: { type: Boolean },
    listItemHeight: {},
    onClickOption: {},
    menuItemSelectedIcon: {},
    labelInValue: { type: Boolean },
    showSearch: { type: Boolean },
    tagRender: {},
    optionLabelRender: {},
    onClear: {},
    defaultOpen: { type: Boolean },
    onDropdownVisibleChange: {},
    maxTagTextLength: {},
    maxTagCount: {},
    maxTagPlaceholder: {},
    tokenSeparators: {},
    removeIcon: {},
    dropdownStyle: {},
    dropdownRender: {},
    dropdownAlign: {},
    showAction: {},
    onPopupScroll: {},
    onInputKeyDown: {},
    request: {},
    multiple: { type: Boolean },
    value: {},
    "onUpdate:value": {},
    searchMode: {},
    refetchOnFocus: { type: Boolean },
    fetchOnFocus: { type: Boolean },
    fetchOnOpen: { type: Boolean },
    lazy: { type: [Boolean, String] },
    addAll: { type: [Boolean, Number] },
    params: {},
    searchDelay: {},
    allowOnlySelect: { type: Boolean }
  },
  setup(a) {
    const e = a, r = s(() => {
      const o = e.value;
      if (!o)
        return e.emptyText;
      const t = e.fieldNames?.label || "label", l = e.fieldNames?.value || "value";
      return y(o) ? o.map(
        (n) => e.options?.find((p) => p[l] === n)?.[t]
      ).filter(Boolean).join("、") || e.emptyText : e.options?.find(
        (n) => n[l] === o
      )?.[t] || e.emptyText;
    });
    return (o, t) => a.mode === "read" ? (c(), d("span", f, u(r.value), 1)) : m("", !0);
  }
});
export {
  C as default
};
