function s(o,t,i){const{focusElCls:e,focus:n,borderElCls:c}=i,r=c?"> *":"",d=["hover",n?"focus":null,"active"].filter(Boolean).map(m=>`&:${m} ${r}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:-o.lineWidth},"&-item":{[d]:{zIndex:2},...e?{[`&${e}`]:{zIndex:2}}:{},[`&[disabled] ${r}`]:{zIndex:0}}}}function $(o,t,i){const{borderElCls:e}=i,n=e?`> ${e}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${n}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${n}, &${o}-sm ${n}, &${o}-lg ${n}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${n}, &${o}-sm ${n}, &${o}-lg ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function a(o,t={focus:!0}){const{componentCls:i}=o,e=`${i}-compact`;return{[e]:{...s(o,e,t),...$(i,e,t)}}}export{a as genCompactItemStyle};
