"use strict";const r=require("react/jsx-runtime"),N=require("react"),p=require("../tools/tools.cjs"),t=require("./navbar-brand.cjs"),y=require("./navbar-collapse.cjs"),C=require("./navbar-container.cjs"),P=require("./navbar-nav-item.cjs"),x=require("./navbar-nav-link.cjs"),_=require("./navbar-nav.cjs"),I=require("./navbar-text.cjs"),B=require("./navbar-toggler-icon.cjs"),L=require("./navbar-toggler.cjs"),n=function(O){const{as:m="nav",brand:e,brandPosition:s,brandProps:v,className:g,collapse:l,collapseProps:F,container:u,containerProps:R,dropOldClass:h,expand:o,externalContent:j,fixed:i,nav:c,navProps:$,options:K,scroll:S,skipItem:E,sticky:b,style:f,text:k,textProps:M,toggler:V,togglerIconProps:w,togglerProps:z,variables:T,...A}=O,D=(K??[]).map((a,d)=>({...a,id:a.id??d})),[q]=N.useState(D),G=N.useMemo(()=>{const a=p.classx(!h&&"navbar",o&&(typeof o=="boolean"?"navbar-expand":`navbar-expand-${o}`),i&&`fixed-${i}`,b&&`sticky-${b}`,g),d=p.stylex((Q,H)=>({tKey:p.convertBsKeyToVar(H)}),T,f);return{className:a,style:d}},[g,h,o,i,b,f,T]);return r.jsx(r.Fragment,{children:r.jsxs(m,{...A,...G,children:[j&&j,r.jsxs(C.NavbarContainer,{...R,children:[e&&(!s||s==="left")&&r.jsx(t.NavbarBrand,{...v,children:e}),V&&r.jsx(L.NavbarToggler,{...z,children:r.jsx(B.NavbarTogglerIcon,{...w})}),e&&s==="right"&&r.jsx(t.NavbarBrand,{...v,children:e}),u||r.jsx(r.Fragment,{children:(l||c||!!q.length)&&r.jsxs(y.NavbarCollapse,{...F,children:[e&&s==="hidden"&&r.jsx(t.NavbarBrand,{...v,children:e}),r.jsx(_.NavbarNav,{...$,scroll:S,children:c||r.jsx(r.Fragment,{children:q.map(a=>E||typeof a.item=="boolean"&&!a.item?r.jsx(x.NavbarNavLink,{active:a.active,"aria-current":a.active?"page":void 0,disabled:a.disabled,href:a.href,...a.linkProps,children:a.link},a.id):N.createElement(P.NavbarNavItem,{...a.itemProps,key:a.id},r.jsx(x.NavbarNavLink,{active:a.active,"aria-current":a.active?"page":void 0,disabled:a.disabled,href:a.href,...a.linkProps,children:a.link}),a.item&&a.item))})}),k&&r.jsx(I.NavbarText,{...M,children:k}),l&&l]})})]})]})})};n.Text=I.NavbarText;n.Brand=t.NavbarBrand;n.Toggler=L.NavbarToggler;n.TogglerIcon=B.NavbarTogglerIcon;n.Collapse=y.NavbarCollapse;n.Nav=_.NavbarNav;n.NavItem=P.NavbarNavItem;n.NavLink=x.NavbarNavLink;n.Container=C.NavbarContainer;n.displayName="BRL.Navbar";exports.Navbar=n;
//# sourceMappingURL=navbar.cjs.map
