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