import{isValidElement as e}from"../../_util/props-util/index.mjs";import{cloneVNode as t,createVNode as n}from"vue";import{CaretDownFilled as r,FileOutlined as i,LoadingOutlined as a,MinusSquareOutlined as o,PlusSquareOutlined as s}from"@antsoo-lib/icons";function c(c,l,u,d,f){let{isLeaf:p,expanded:m,loading:h}=u,g=l;if(h)return n(a,{class:`${c}-switcher-loading-icon`},null);let _;f&&typeof f==`object`&&(_=f.showLeafIcon);let v=null,y=`${c}-switcher-icon`;return p?f?_&&d?d(u):(v=typeof f==`object`&&!_?n(`span`,{class:`${c}-switcher-leaf-line`},null):n(i,{class:`${c}-switcher-line-icon`},null),v):null:(v=n(r,{class:y},null),f&&(v=n(m?o:s,{class:`${c}-switcher-line-icon`},null)),typeof l==`function`?g=l({...u,defaultIcon:v,switcherCls:y}):e(g)&&(g=t(g,{class:y})),g||v)}export{c as default};