"use strict";const i=require("./jsx-runtime-evvPGacs.cjs"),l=require("react"),r=require("./css-x0qKpJph.cjs"),S=require("./Center-UNXZHbuA.cjs"),a=require("./Toggle-oSdnI-zd.cjs"),j=require("./aggregator-_DqLetA1.cjs");require("react-hook-form");const m=l.createContext({divided:!1,level:"h1"}),x=()=>l.useContext(m),p=({children:s,className:o,level:e="h1",divided:n=!1,...t})=>i.jsxRuntimeExports.jsx(m.Provider,{value:{level:e,divided:n},children:i.jsxRuntimeExports.jsx(S.Space,{el:"header",direction:"x",justify:"spaceBetween",className:r.CSS(r.CSS.B("header"),r.CSS.bordered("bottom"),n&&r.CSS.BM("header","divided"),o),...t,children:s})}),C=({children:s=[]})=>{const{level:o,divided:e}=x();return i.jsxRuntimeExports.jsx(S.Space,{direction:"x",size:"small",align:"center",className:r.CSS.BE("header","actions"),children:r.toArray(s).map((n,t)=>i.jsxRuntimeExports.jsx(h,{index:t,level:o,divided:e,children:n},t))})},h=({index:s,level:o,children:e,divided:n})=>{let t=e;if(!l.isValidElement(e)){const c=e;t=i.jsxRuntimeExports.jsx(a.Icon,{onClick:u=>{var d;u.stopPropagation(),u.preventDefault(),(d=c.onClick)==null||d.call(c,u)},size:j.LevelComponentSizes[o],...c},s)}return i.jsxRuntimeExports.jsxs(l.Fragment,{children:[n&&i.jsxRuntimeExports.jsx(a.Divider,{}),t]},s)},v=({children:s="",className:o,onClick:e,...n})=>{const{level:t}=x();return i.jsxRuntimeExports.jsx(a.Button,{variant:"text",size:j.LevelComponentSizes[t],onClick:e,className:r.CSS(r.CSS.B("header-button-title"),o),sharp:!0,...n,children:s})},E=({className:s,level:o,...e})=>{const{level:n,divided:t}=x();return i.jsxRuntimeExports.jsx(a.WithIcon,{className:r.CSS(r.CSS.BE("header","text"),s),level:o??n,divided:t,size:1.5,...e})},R=Object.freeze(Object.defineProperty({__proto__:null,Actions:C,ButtonTitle:v,Header:p,Title:E,useContext:x},Symbol.toStringTag,{value:"Module"}));exports.Actions=C;exports.ButtonTitle=v;exports.Header=p;exports.external=R;
//# sourceMappingURL=external-V7oWlotO.cjs.map
