{"version":3,"file":"SettingsShallowRouteRenderer-DtBkn-nC.js","names":[],"sources":["../../src/app/features/settings/SettingsShallowRouteRenderer.tsx"],"sourcesContent":["import { matchPath, useLocation } from 'react-router';\nimport { useScreenSizeContext } from '$hooks/useScreenSize';\nimport { ModalOverlay } from '$components/modal-overlay/ModalOverlay';\nimport { isShallowRoute } from '$pages/client/shallowRoute';\nimport { useCloseShallowRoute } from '$pages/client/useShallowRoute';\nimport { SETTINGS_PATH } from '$pages/paths';\nimport { SettingsRoute } from './SettingsRoute';\n\nexport function SettingsShallowRouteRenderer() {\n  const location = useLocation();\n  const screenSize = useScreenSizeContext();\n  const requestClose = useCloseShallowRoute();\n  const routeMatch = matchPath(SETTINGS_PATH, location.pathname);\n\n  if (!routeMatch || !isShallowRoute(location.pathname, location.state, screenSize)) {\n    return null;\n  }\n\n  return (\n    <ModalOverlay requestClose={requestClose} mobile=\"fullscreen\" size=\"500\">\n      <SettingsRoute routeSection={routeMatch.params.section} />\n    </ModalOverlay>\n  );\n}\n"],"mappings":"uOAQA,SAAgB,GAA+B,CAC7C,IAAM,EAAW,EAAY,EACvB,EAAa,EAAqB,EAClC,EAAe,EAAqB,EACpC,EAAa,EAAU,EAAe,EAAS,QAAQ,EAM7D,MAJI,CAAC,GAAc,CAAC,EAAe,EAAS,SAAU,EAAS,MAAO,CAAU,EACvE,MAIP,EAAA,EAAA,IAAA,CAAC,EAAD,CAA4B,eAAc,OAAO,aAAa,KAAK,MACjE,UAAA,EAAA,EAAA,IAAA,CAAC,EAAD,CAAe,aAAc,EAAW,OAAO,OAAU,CAAA,CAC7C,CAAA,CAElB"}