import{_ as c}from"./index.TkDYtvUB.js";import{j as a,r as u,f as $,p as l}from"./index.CPcBO1Os.js";function I(e){const t=Symbol("contextKey");return{useProvide:(o,i)=>{const s=u({});return l(t,s),$(()=>{c(s,o,i||{})}),s},useInject:()=>a(t,e)||{}}}function f(e,t,r){const{focusElCls:n,focus:o,borderElCls:i}=r,s=i?"> *":"",m=["hover",o?"focus":null,"active"].filter(Boolean).map(d=>"&:".concat(d," ").concat(s)).join(",");return{["&-item:not(".concat(t,"-last-item)")]:{marginInlineEnd:-e.lineWidth},"&-item":c(c({[m]:{zIndex:2}},n?{["&".concat(n)]:{zIndex:2}}:{}),{["&[disabled] ".concat(s)]:{zIndex:0}})}}function b(e,t,r){const{borderElCls:n}=r,o=n?"> ".concat(n):"";return{["&-item:not(".concat(t,"-first-item):not(").concat(t,"-last-item) ").concat(o)]:{borderRadius:0},["&-item:not(".concat(t,"-last-item)").concat(t,"-first-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartEndRadius:0,borderEndEndRadius:0}},["&-item:not(".concat(t,"-first-item)").concat(t,"-last-item")]:{["& ".concat(o,", &").concat(e,"-sm ").concat(o,", &").concat(e,"-lg ").concat(o)]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function h(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:r}=e,n="".concat(r,"-compact");return{[n]:c(c({},f(e,n,t)),b(r,n,t))}}export{I as c,h as g};
