{"ast":null,"code":"\"use strict\";\n\nimport * as React from 'react';\nimport { CurrentRenderContext } from \"./CurrentRenderContext.js\";\nexport function useCurrentRender(_ref) {\n  var state = _ref.state,\n    navigation = _ref.navigation,\n    descriptors = _ref.descriptors;\n  var current = React.useContext(CurrentRenderContext);\n  if (current && navigation.isFocused()) {\n    current.options = descriptors[state.routes[state.index].key].options;\n  }\n}","map":{"version":3,"names":["React","CurrentRenderContext","useCurrentRender","_ref","state","navigation","descriptors","current","useContext","isFocused","options","routes","index","key"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/@react-navigation/core/src/useCurrentRender.tsx"],"sourcesContent":["import type { NavigationState, ParamListBase } from '@react-navigation/routers';\nimport * as React from 'react';\n\nimport { CurrentRenderContext } from './CurrentRenderContext';\nimport type {\n  Descriptor,\n  NavigationHelpers,\n  NavigationProp,\n  RouteProp,\n} from './types';\n\ntype Options = {\n  state: NavigationState;\n  navigation: NavigationHelpers<ParamListBase>;\n  descriptors: Record<\n    string,\n    Descriptor<object, NavigationProp<ParamListBase>, RouteProp<ParamListBase>>\n  >;\n};\n\n/**\n * Write the current options, so that server renderer can get current values\n * Mutating values like this is not safe in async mode, but it doesn't apply to SSR\n */\nexport function useCurrentRender({ state, navigation, descriptors }: Options) {\n  const current = React.useContext(CurrentRenderContext);\n\n  if (current && navigation.isFocused()) {\n    current.options = descriptors[state.routes[state.index].key].options;\n  }\n}\n"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,oBAAoB;AAqB7B,OAAO,SAASC,gBAAgBA,CAAAC,IAAA,EAA8C;EAAA,IAA3CC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,UAAU,GAAAF,IAAA,CAAVE,UAAU;IAAEC,WAAA,GAAAH,IAAA,CAAAG,WAAA;EACpD,IAAMC,OAAO,GAAGP,KAAK,CAACQ,UAAU,CAACP,oBAAoB,CAAC;EAEtD,IAAIM,OAAO,IAAIF,UAAU,CAACI,SAAS,CAAC,CAAC,EAAE;IACrCF,OAAO,CAACG,OAAO,GAAGJ,WAAW,CAACF,KAAK,CAACO,MAAM,CAACP,KAAK,CAACQ,KAAK,CAAC,CAACC,GAAG,CAAC,CAACH,OAAO;EACtE;AACF","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}