"use strict";const t=require("./Toggle-C-n_Itw1.cjs"),C=require("./jsx-runtime-Cek9Ww4S.cjs"),v=require("./Link-DacxhXPG.cjs"),x=require("./css-C4GOlJsi.cjs"),u=require("react"),a=u.createContext({onClick:()=>{},selected:""}),E=()=>u.useContext(a),O=({children:i,onChange:e,level:c,iconSpacing:o,value:r=""})=>{const n=u.useCallback(s=>{typeof e=="function"?e(s):e&&s in e&&e[s](s)},[e]),l=u.useMemo(()=>({onClick:n,selected:r,level:c,iconSpacing:o}),[r,n,c,o]);return C.jsxRuntimeExports.jsx(a.Provider,{value:l,children:i})},R=()=>C.jsxRuntimeExports.jsx(t.Divider,{direction:"x",padded:!0}),m=(i,e)=>c=>{const{itemKey:o,className:r,onClick:n,size:l,...s}={...e,...c},{onClick:S,selected:j,level:p,iconSpacing:M}=E(),_=k=>{S(o),n==null||n(k)},I=j===o;return C.jsxRuntimeExports.jsx(i,{level:p,...s,onClick:_,variant:"text",className:x.CSS(x.CSS.B("menu-item"),x.CSS.selected(I),r),size:l??M})},d=m(t.Button,{noWrap:!0}),f=m(t.Icon),L=m(v.Link,{noWrap:!0}),T=d;T.Icon=f;T.Link=L;const N=Object.freeze(Object.defineProperty({__proto__:null,CONTEXT_SELECTED:t.CONTEXT_SELECTED,CONTEXT_TARGET:t.CONTEXT_TARGET,ContextMenu:t.ContextMenu,CoreItem:d,Divider:R,Item:T,Menu:O,MenuContext:a,useContextMenu:t.useContextMenu,useMenuContext:E},Symbol.toStringTag,{value:"Module"}));exports.external=N;
