const e=require("../../_util/vnode.js"),t=require("../context.js"),n=require("../utils/commonUtil.js"),r=require("../hooks/useSearchOptions.js"),i=require("./Checkbox.js");let a=require("vue");var o=`__cascader_fix_label__`;function s({prefixCls:o,multiple:s,options:c,activeValue:l,prevValuePath:u,onToggleOpen:d,onSelect:f,onActive:p,checkedSet:m,halfCheckedSet:h,loadingKeys:g,isSelectable:_}){let v=`${o}-menu`,y=`${o}-menu-item`,{fieldNames:b,changeOnSelect:x,expandTrigger:S,expandIcon:C,loadingIcon:w,dropdownMenuColumnStyle:T,customSlots:E}=t.useInjectCascader(),D=C.value??E.value.expandIcon?.(),O=w.value??E.value.loadingIcon?.(),k=S.value===`hover`;return(0,a.createVNode)(`ul`,{class:v,role:`menu`},[c.map(t=>{let{disabled:c}=t,v=t[r.SEARCH_MARK],S=t.__cascader_fix_label__??t[b.value.label],C=t[b.value.value],w=n.isLeaf(t,b.value),E=v?v.map(e=>e[b.value.value]):[...u,C],A=n.toPathKey(E),j=g.includes(A),M=m.has(A),N=h.has(A),P=()=>{!c&&(!k||!w)&&p(E)},F=()=>{_(t)&&f(E,w)},I;return typeof t.title==`string`?I=t.title:typeof S==`string`&&(I=S),(0,a.createVNode)(`li`,{key:A,class:[y,{[`${y}-expand`]:!w,[`${y}-active`]:l===C,[`${y}-disabled`]:c,[`${y}-loading`]:j}],style:T.value,role:`menuitemcheckbox`,title:I,"aria-checked":M,"data-path-key":A,onClick:()=>{P(),(!s||w)&&F()},onDblclick:()=>{x.value&&d(!1)},onMouseenter:()=>{k&&P()},onMousedown:e=>{e.preventDefault()}},[s&&(0,a.createVNode)(i.default,{prefixCls:`${o}-checkbox`,checked:M,halfChecked:N,disabled:c,onClick:e=>{e.stopPropagation(),F()}},null),(0,a.createVNode)(`div`,{class:`${y}-content`},[S]),!j&&D&&!w&&(0,a.createVNode)(`div`,{class:`${y}-expand-icon`},[e.cloneElement(D)]),j&&O&&(0,a.createVNode)(`div`,{class:`${y}-loading-icon`},[e.cloneElement(O)])])})])}s.props=[`prefixCls`,`multiple`,`options`,`activeValue`,`prevValuePath`,`onToggleOpen`,`onSelect`,`onActive`,`checkedSet`,`halfCheckedSet`,`loadingKeys`,`isSelectable`],s.displayName=`Column`,s.inheritAttrs=!1,exports.FIX_LABEL=o,exports.default=s;