"use strict";const e=require("vue"),B=require("./Base.vue_vue_type_script_setup_true_lang-C_-WLPmH.js"),r=require("./base-iCmnU-fv.js"),g={key:0,class:"dropdownLayer-text-arrow"},x=["title"],h={key:0,class:"dropdownLayer-placeholder"},O=["innerHTML"],L={key:4,class:"dropdownLayer-text-arrow"},b=e.defineComponent({name:"ClDropdownlayerList",__name:"List",props:{classParent:String,classText:String,classDropDown:String,placeholder:String,isDisabled:{type:Boolean,default:!1},isClear:{type:Boolean,default:!1},textLabel:{type:String,default:""},textArrowDirection:{type:String,default:"right"},dropdownArrowPos:{type:String,default:"left"},isUseDropdownArrow:{type:Boolean,default:!1},isCloseDestroy:{type:Boolean,default:!0},onOpenBeforeCallback:Function},emits:["onChangeOpen","onClear","onChangePosition","onOpenComplete"],setup(t,{expose:c,emit:i}){const d=e.useSlots(),n=t,a=i,s=e.ref(),p=e.computed(()=>!r.CommonBase.isUndefined(d.labelCustom)),m=e.computed(()=>{let o;const{textLabel:l}=n;return r.CommonBase.isHtml(l)?o=r.CommonBase.removeHTMLTags(l):o=l,o}),u=e.computed(()=>{let o=" dropdownLayer-theme-list ";return n.classParent&&!r.CommonBase.isEmpty(n.classParent)&&(o+=n.classParent),o}),w=e.computed(()=>{let o=" dropdownLayer-dropdown-theme-list ";return n.classDropDown&&!r.CommonBase.isEmpty(n.classDropDown)&&(o+=n.classDropDown),o}),C=e.computed(()=>({"dropdownLayer-text-container":!0,"arrow-pos-left":n.textArrowDirection==="left"})),k=o=>{a("onChangeOpen",o)},y=o=>{a("onChangePosition",o)},D=()=>{n.isDisabled||a("onClear")},f=()=>{a("onOpenComplete")};return c({setOpen:o=>{s.value.setOpen(o)},calculationPosition:()=>s.value.calculationPosition(),initCompleteOpen:()=>{s.value.initCompleteOpen()},checkCurrentIsOpen:()=>s.value.getIsShowOpen()}),(o,l)=>(e.openBlock(),e.createBlock(B._sfc_main,{ref_key:"refElDropdownLayer",ref:s,classParent:u.value,classText:t.classText,classDropDown:w.value,isDisabled:t.isDisabled,dropdownArrowPos:t.dropdownArrowPos,isUseDropdownArrow:t.isUseDropdownArrow,isCloseDestroy:t.isCloseDestroy,isInitDelayComplete:!0,onOpenBeforeCallback:t.onOpenBeforeCallback,onOnChangeOpen:k,onOnChangePosition:y,onOnOpenComplete:f},{labelText:e.withCtx(()=>[p.value?e.renderSlot(o.$slots,"labelCustom",{key:0}):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(C.value)},[t.textArrowDirection==="left"?(e.openBlock(),e.createElementBlock("div",g,[...l[0]||(l[0]=[e.createElementVNode("i",{class:"clIconFont clIcon-angle-down"},null,-1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[],64)),e.createElementVNode("div",{class:"dropdownLayer-text-render",title:m.value},[t.textLabel.length===0?(e.openBlock(),e.createElementBlock("span",h,e.toDisplayString(t.placeholder),1)):(e.openBlock(),e.createElementBlock("span",{key:1,innerHTML:t.textLabel},null,8,O))],8,x),!t.isDisabled&&t.isClear&&t.textLabel.length>0?(e.openBlock(),e.createElementBlock("i",{key:2,class:"dropdownLayer-text-clear clIconFont clIcon-close-circle-fill",onClick:e.withModifiers(D,["stop"])})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[],64)),e.renderSlot(o.$slots,"textExtend"),t.textArrowDirection==="right"?(e.openBlock(),e.createElementBlock("div",L,[...l[1]||(l[1]=[e.createElementVNode("i",{class:"clIconFont clIcon-angle-down"},null,-1)])])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[],64))],2))]),dropdown:e.withCtx(()=>[e.renderSlot(o.$slots,"dropdown"),e.renderSlot(o.$slots,"dropdownExtend")]),_:3},8,["classParent","classText","classDropDown","isDisabled","dropdownArrowPos","isUseDropdownArrow","isCloseDestroy","onOpenBeforeCallback"]))}});exports._sfc_main=b;
//# sourceMappingURL=List.vue_vue_type_script_setup_true_lang-Dr6PppOP.js.map
