{"version":3,"file":"garages-map-8c5621cb.js","sources":["../../../app/frontend/components/garage-view.tsx","../../../app/frontend/entrypoints/garages-map.tsx"],"sourcesContent":["import React, { useState } from 'react'\nimport Tabs from '@mui/joy/Tabs'\nimport TabList from '@mui/joy/TabList'\nimport Tab from '@mui/joy/Tab'\nimport TabPanel from '@mui/joy/TabPanel'\nimport Box from '@mui/joy/Box'\nimport Typography from '@mui/joy/Typography'\nimport Button from '@mui/joy/Button'\nimport Badge from '@mui/joy/Badge'\nimport Modal from '@mui/joy/Modal'\nimport ModalClose from '@mui/joy/ModalClose'\nimport ModalDialog from '@mui/joy/ModalDialog'\nimport { useTranslation, Trans } from 'react-i18next'\n\nimport GarageList from './garage-list'\nimport GarageMap from './garage-map'\nimport Filters from './filters'\nimport FullGarageToggleIsolated from './full-garage-toggle-isolated'\nimport { getCurrency } from '../helpers'\nimport { useGarageView } from '../hooks/use-garage-view'\n\nconst currency = getCurrency()\n\nexport default function GarageView() {\n\n const [tab, setTab] = useState<0 | 1 | 2>(0)\n\n const { t } = useTranslation()\n \n const {\n initialFilters,\n currentFilters,\n setCurrentFilters,\n minPrice,\n maxPrice,\n desktopFilters,\n selectedId,\n setSelectedId,\n hoverPoint,\n setHoverPoint,\n searchLocationPoint,\n sortedFilteredGarageList,\n loadingGarageList,\n loadingGarageAvailability,\n garagesAvailableLater,\n errors,\n handleFiltersReset,\n handleTabChange,\n handleToggleDesktopFilters,\n shallowEqual,\n } = useGarageView(currency, setTab)\n\n return (\n <>\n \n \n \n \n \n {!loadingGarageList &&\n \n }\n \n \n \n \n \n \n {t('general.list')}\n \n \n {t('general.map')}\n \n \n \n {t('general.filters')}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {t('general.filters')}\n \n \n \n \n \n \n \n {!loadingGarageList &&\n \n }\n \n handleToggleDesktopFilters()}>\n \n \n \n {t('general.filters')}\n \n \n \n \n \n \n )\n}\n","// To see this message, add the following to the `` section in your\n// views/layouts/application.html.erb\n//\n// <%= vite_client_tag %>\n// <%= vite_javascript_tag 'application' %>\n// console.log('Vite ⚡️ Rails')\n\n// If using a TypeScript entrypoint file:\n// <%= vite_typescript_tag 'application' %>\n//\n// If you want to use .jsx or .tsx, add the extension:\n// <%= vite_javascript_tag 'application.jsx' %>\n\n// console.log('Visit the guide for more information: ', 'https://vite-ruby.netlify.app/guide/rails')\n\n// Example: Load Rails libraries in Vite.\n//\n// import * as Turbo from '@hotwired/turbo'\n// Turbo.start()\n//\n// import ActiveStorage from '@rails/activestorage'\n// ActiveStorage.start()\n//\n// // Import all channels.\n// const channels = import.meta.globEager('./**/*_channel.js')\n\n// Example: Import a stylesheet in app/frontend/index.css\n// import '~/index.css'\n\nimport React from 'react'\nimport { createRoot } from 'react-dom/client'\nimport { CssVarsProvider } from '@mui/joy'\nimport { Provider as JotaiProvider } from 'jotai'\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { theme } from '../theme'\nimport axios from 'axios'\n\nimport Box from '@mui/joy/Box'\n\nimport '../i18n'\nimport GarageView from '../components/garage-view'\nimport SearchView from '../components/search-view'\nimport { API_KEY, API_VERSION } from '../constants'\n\nconst queryClient = new QueryClient()\n\naxios.defaults.headers.common['x-api-key'] = API_KEY\naxios.defaults.headers.common['x-api-version'] = API_VERSION\n\nfunction GaragesMap() {\n return (\n \n \n \n \n \n \n \n \n \n \n )\n}\n \nconst domNode = document.getElementById('react-garages')\n\nconst root = createRoot(domNode)\n\nroot.render()\n"],"names":["currency","getCurrency","GarageView","tab","setTab","useState","t","useTranslation","initialFilters","currentFilters","setCurrentFilters","minPrice","maxPrice","desktopFilters","selectedId","setSelectedId","hoverPoint","setHoverPoint","searchLocationPoint","sortedFilteredGarageList","loadingGarageList","loadingGarageAvailability","garagesAvailableLater","errors","handleFiltersReset","handleTabChange","handleToggleDesktopFilters","shallowEqual","useGarageView","React","Tabs","TabPanel","GarageList","GarageMap","Filters","TabList","Tab","Box","Badge","Typography","Trans","FullGarageToggleIsolated","Button","Modal","ModalDialog","ModalClose","queryClient","QueryClient","axios","API_KEY","API_VERSION","GaragesMap","JotaiProvider","CssVarsProvider","theme","QueryClientProvider","SearchView","domNode","root","createRoot"],"mappings":"ycAqBA,MAAMA,EAAWC,EAAY,EAE7B,SAAwBC,IAAa,CAEjC,KAAM,CAACC,EAAKC,CAAM,EAAIC,WAAoB,CAAC,EAErC,CAAE,EAAAC,GAAMC,IAER,CACF,eAAAC,EACA,eAAAC,EACA,kBAAAC,EACA,SAAAC,EACA,SAAAC,EACA,eAAAC,EACA,WAAAC,EACA,cAAAC,EACA,WAAAC,EACA,cAAAC,EACA,oBAAAC,EACA,yBAAAC,EACA,kBAAAC,EACA,0BAAAC,EACA,sBAAAC,EACA,OAAAC,EACA,mBAAAC,EACA,gBAAAC,EACA,2BAAAC,EACA,aAAAC,CAAA,EACAC,EAAc5B,EAAUI,CAAM,EAElC,OAEQyB,EAAA,cAAAA,EAAA,SAAA,KAAAA,EAAA,cAACC,EAAA,CACG,aAAW,aACX,MAAO3B,EACP,SAAUsB,EACV,GAAI,CACA,OAAQ,OACR,QAAS,CACL,GAAI,MACR,CACJ,CAAA,EAECI,EAAA,cAAAE,EAAA,CAAS,MAAO,EAAG,GAAI,CACpB,EAAG,EACH,SAAU,EACV,WAAY,EACZ,UAAW,MACX,UAAW,OACX,gBAAiB,SAAA,CAEjB,EAAAF,EAAA,cAACG,EAAA,CACG,WAAYb,EACZ,kBAAAC,EACA,0BAAAC,EACA,sBAAAC,EACA,OAAAC,EACA,SAAAvB,CAAA,CAAA,CAER,EACC6B,EAAA,cAAAE,EAAA,CAAS,MAAO,EAAG,GAAI,CACpB,EAAG,CACJ,EAAA,YAAW,EACT,EAAA,CAACX,GACES,EAAA,cAACI,EAAA,CACG,WAAYd,EACZ,SAAUhB,IAAQ,EAClB,WAAAW,EACA,cAAAC,EACA,WAAAC,EACA,cAAAC,EACA,oBAAAC,EACA,0BAAAG,EACA,sBAAAC,EACA,SAAAtB,EACA,iBAAkB,IAAA,CAAA,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