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