"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),s=require("lodash-unified"),c={key:0},d=o.defineComponent({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(l){const e=l,i=o.computed(()=>{const t=e.value;if(!t)return e.emptyText;const n=e.fieldNames?.label||"label",r=e.fieldNames?.value||"value";return s.isArray(t)?t.map(a=>e.options?.find(p=>p[r]===a)?.[n]).filter(Boolean).join("、")||e.emptyText:e.options?.find(a=>a[r]===t)?.[n]||e.emptyText});return(t,n)=>l.mode==="read"?(o.openBlock(),o.createElementBlock("span",c,o.toDisplayString(i.value),1)):o.createCommentVNode("",!0)}});exports.default=d;
