{"ast":null,"code":"import * as React from 'react';\nimport CurrentRenderContext from \"./CurrentRenderContext\";\nexport default 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,"sources":["useCurrentRender.tsx"],"names":["React","CurrentRenderContext","useCurrentRender","state","navigation","descriptors","current","useContext","isFocused","options","routes","index","key"],"mappings":"AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,oBAAoB;AAqB3B,eAAe,SAASC,gBAAgB,CAAA,IAAA,EAI5B;EAJ6B,IACvCC,KAAK,GAGG,IAAA,CAHRA,KAAK;IACLC,UAAU,GAEF,IAAA,CAFRA,UAAU;IACVC,WAAAA,GACQ,IAAA,CADRA,WAAAA;EAEA,IAAMC,OAAO,GAAGN,KAAK,CAACO,UAAU,CAACN,oBAAoB,CAAC;EAEtD,IAAIK,OAAO,IAAIF,UAAU,CAACI,SAAS,EAAE,EAAE;IACrCF,OAAO,CAACG,OAAO,GAAGJ,WAAW,CAACF,KAAK,CAACO,MAAM,CAACP,KAAK,CAACQ,KAAK,CAAC,CAACC,GAAG,CAAC,CAACH,OAAO;EACtE;AACF","sourceRoot":"../../src","sourcesContent":["import * as React from 'react';\nimport CurrentRenderContext from './CurrentRenderContext';\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 default function useCurrentRender(_ref) {\n let {\n state,\n navigation,\n descriptors\n } = _ref;\n const current = React.useContext(CurrentRenderContext);\n if (current && navigation.isFocused()) {\n current.options = descriptors[state.routes[state.index].key].options;\n }\n}\n//# sourceMappingURL=useCurrentRender.js.map"]},"metadata":{},"sourceType":"module"}