{"version":3,"file":"AppShellNavbar.cjs","sources":["../../../../src/components/AppShell/AppShellNavbar/AppShellNavbar.tsx"],"sourcesContent":["import {\n  Box,\n  BoxProps,\n  ElementProps,\n  factory,\n  Factory,\n  StylesApiProps,\n  useProps,\n} from '../../../core';\nimport { useAppShellContext } from '../AppShell.context';\n\nexport type AppShellNavbarStylesNames = 'navbar';\n\nexport interface AppShellNavbarProps\n  extends BoxProps,\n    StylesApiProps<AppShellNavbarFactory>,\n    ElementProps<'div'> {\n  /** Determines whether component should have a border, overrides `withBorder` prop on `AppShell` component */\n  withBorder?: boolean;\n\n  /** Component `z-index`, by default inherited from the `AppShell` */\n  zIndex?: string | number;\n}\n\nexport type AppShellNavbarFactory = Factory<{\n  props: AppShellNavbarProps;\n  ref: HTMLElement;\n  stylesNames: AppShellNavbarStylesNames;\n}>;\n\nconst defaultProps: Partial<AppShellNavbarProps> = {};\n\nexport const AppShellNavbar = factory<AppShellNavbarFactory>((_props, ref) => {\n  const props = useProps('AppShellNavbar', defaultProps, _props);\n  const {\n    classNames,\n    className,\n    style,\n    styles,\n    unstyled,\n    vars,\n    withBorder,\n    zIndex,\n    mod,\n    ...others\n  } = props;\n  const ctx = useAppShellContext();\n\n  if (ctx.disabled) {\n    return null;\n  }\n\n  return (\n    <Box\n      component=\"nav\"\n      ref={ref}\n      mod={[{ 'with-border': withBorder ?? ctx.withBorder }, mod]}\n      {...ctx.getStyles('navbar', { className, classNames, styles, style })}\n      {...others}\n      __vars={{\n        '--app-shell-navbar-z-index': `calc(${zIndex ?? ctx.zIndex} + 1)`,\n      }}\n    />\n  );\n});\n\nAppShellNavbar.displayName = '@raikou/core/AppShellNavbar';\n"],"names":["factory","useProps","useAppShellContext","jsx","Box"],"mappings":";;;;;;;;;;;;;AA8BA,MAAM,eAA6C,EAAC;AAE7C,MAAM,cAAiB,GAAAA,eAAA,CAA+B,CAAC,MAAA,EAAQ,GAAQ,KAAA;AAC5E,EAAA,MAAM,KAAQ,GAAAC,iBAAA,CAAS,gBAAkB,EAAA,YAAA,EAAc,MAAM,CAAA;AAC7D,EAAM,MAAA;AAAA,IACJ,UAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,GAAA;AAAA,IACA,GAAG;AAAA,GACD,GAAA,KAAA;AACJ,EAAA,MAAM,MAAMC,mCAAmB,EAAA;AAE/B,EAAA,IAAI,IAAI,QAAU,EAAA;AAChB,IAAO,OAAA,IAAA;AAAA;AAGT,EACE,uBAAAC,cAAA;AAAA,IAACC,OAAA;AAAA,IAAA;AAAA,MACC,SAAU,EAAA,KAAA;AAAA,MACV,GAAA;AAAA,MACA,GAAA,EAAK,CAAC,EAAE,aAAA,EAAe,cAAc,GAAI,CAAA,UAAA,IAAc,GAAG,CAAA;AAAA,MACzD,GAAG,IAAI,SAAU,CAAA,QAAA,EAAU,EAAE,SAAW,EAAA,UAAA,EAAY,MAAQ,EAAA,KAAA,EAAO,CAAA;AAAA,MACnE,GAAG,MAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,4BAA8B,EAAA,CAAA,KAAA,EAAQ,MAAU,IAAA,GAAA,CAAI,MAAM,CAAA,KAAA;AAAA;AAC5D;AAAA,GACF;AAEJ,CAAC;AAED,cAAA,CAAe,WAAc,GAAA,6BAAA;;;;"}