{"version":3,"file":"index.DnZ1NPNU.js","sources":["../../../../../../../node_modules/@babylon/ui-kit-searchers/components/others/searcher/redirecting-modal/constants.js","../../../../../../../node_modules/@babylon/ui-kit-searchers/components/others/searcher/redirecting-modal/themes/styles/liverpool.js","../../../../../../../node_modules/@babylon/ui-kit-searchers/components/others/searcher/redirecting-modal/themes/index.js","../../../../../../../node_modules/@babylon/ui-kit-searchers/components/others/searcher/redirecting-modal/styled.js","../../../../../../../node_modules/@babylon/ui-kit-searchers/components/others/searcher/redirecting-modal/index.js"],"sourcesContent":["const LOADING = {\n LOADING_SRC: '/contenidos/fotos/CIUDADES/',\n LOADING_ALTERNATIVE: '/comun/images/lineas/paquetes_800x600.jpg'\n};\n\nexport { LOADING };\n","import { ModalWrapper } from '@babylon/ui-kit-structures/components/others/modal/styled';\nimport { BorderRadius } from '@babylon/ui-kit-styles/common/mixins/logical.styled';\nimport { css } from 'styled-components';\n\nconst liverpoolRedirectingModalStyles = {\n SearcherRedirectingModalWrapper: ()=>/*#__PURE__*/ css([\n ``,\n `{`,\n ` filter:drop-shadow(0 0 8px rgb(0 0 0 / 16%)) drop-shadow(0 1px 4px rgb(0 0 0 / 24%));}`\n ], ModalWrapper, BorderRadius({\n all: '8px'\n })),\n SearcherRedirectingModalLoader: ()=>/*#__PURE__*/ css([\n `background-color:`,\n `;&::before{background-color:`,\n `;}`,\n `{background-color:`,\n `;&::before{background-color:`,\n `;}}`\n ], ({ theme })=>theme.colors.secondary.lighter, ({ theme })=>theme.colors.secondary.base, ({ theme })=>theme.media.phone.only, ({ theme })=>theme.colors.status.hovered, ({ theme })=>theme.colors.primary.base)\n};\n\nexport { liverpoolRedirectingModalStyles as default };\n","import { createThemes } from '@babylon/ui-kit-styles/common/themes';\nimport liverpoolRedirectingModalStyles from './styles/liverpool.js';\n\nconst redirectingModalThemes = createThemes({\n partnershipsLiverpool: liverpoolRedirectingModalStyles\n});\n\nexport { redirectingModalThemes as default };\n","import Modal from '@babylon/ui-kit-structures/components/others/modal';\nimport { FontMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport { BorderRadius } from '@babylon/ui-kit-styles/common/mixins/logical.styled';\nimport styled, { keyframes } from 'styled-components';\nimport redirectingModalThemes from './themes/index.js';\n\nconst SearcherRedirectingModalWrapper = /*#__PURE__*/ styled(Modal).withConfig({\n displayName: \"SearcherRedirectingModalWrapper\"\n})([\n `& > div{max-width:450px;}img{`,\n `;}`,\n ``\n], ({ theme })=>BorderRadius({\n topLeft: `${theme.border.radius.rounded}`,\n topRight: `${theme.border.radius.rounded}`\n }), redirectingModalThemes('SearcherRedirectingModalWrapper'));\nconst SearcherRedirectingModalLoaderAnimation = /*#__PURE__*/ keyframes([\n `from{left:-200px;width:30%;}50%{width:30%;}70%{width:70%;}80%{left:50%;}95%{left:120%;}to{left:100%;}`\n]);\nconst SearcherRedirectingModalLoader = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"SearcherRedirectingModalLoader\"\n})([\n `background-color:rgba(39,174,96,0.2);height:4px;overflow:hidden;position:relative;width:100%;&::before{content:'';display:block;position:absolute;left:-200px;width:200px;height:4px;background-color:`,\n `;animation:`,\n ` 2s linear infinite;}`,\n ``\n], ({ theme })=>theme.colors.status.success, SearcherRedirectingModalLoaderAnimation, redirectingModalThemes('SearcherRedirectingModalLoader'));\nconst SearcherRedirectingModalContent = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"SearcherRedirectingModalContent\"\n})([\n `padding:32px;text-align:center;`\n]);\nconst SearcherRedirectingModalTitle = /*#__PURE__*/ styled.p.withConfig({\n displayName: \"SearcherRedirectingModalTitle\"\n})([\n `margin-bottom:12px;color:`,\n `;`,\n ``\n], ({ theme })=>theme.colors.grays.darker, FontMixin({\n size: 'largest',\n height: 'larger',\n weight: 'light'\n}));\nconst SearcherRedirectingModalDescription = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"SearcherRedirectingModalDescription\"\n})([\n `margin-bottom:4px;color:`,\n `;`,\n ``\n], ({ theme })=>theme.colors.grays.darker, FontMixin({\n size: 'medium',\n height: 'medium',\n weight: 'light'\n}));\nconst SearcherRedirectingModalMessage = /*#__PURE__*/ styled.p.withConfig({\n displayName: \"SearcherRedirectingModalMessage\"\n})([\n `color:`,\n `;`,\n ``\n], ({ theme })=>theme.colors.grays.dark, FontMixin({\n size: 'medium',\n height: 'medium',\n weight: 'light'\n}));\n\nexport { SearcherRedirectingModalContent, SearcherRedirectingModalDescription, SearcherRedirectingModalLoader, SearcherRedirectingModalMessage, SearcherRedirectingModalTitle, SearcherRedirectingModalWrapper };\n","import { jsx, jsxs } from 'react/jsx-runtime';\nimport Image from '@babylon/ui-kit-base/components/multimedia/image';\nimport contextBabylon from '@babylon/ui-kit-context';\nimport { transformAccommodationValueToText } from '@babylon/ui-kit-forms/helpers/accommodation';\nimport { transformPassengersValueToText } from '@babylon/ui-kit-forms/helpers/passengers';\nimport { formatDate } from '@babylon/ui-kit-helpers/date';\nimport { useContext, useState, useEffect, useMemo } from 'react';\nimport { LOADING } from './constants.js';\nimport { SearcherRedirectingModalWrapper, SearcherRedirectingModalLoader, SearcherRedirectingModalContent, SearcherRedirectingModalTitle, SearcherRedirectingModalDescription, SearcherRedirectingModalMessage } from './styled.js';\n\nconst SearcherRedirectingModal = ({ visible = false, literals, alternative, loadingImage, origin, destination, accommodation, passengers, dates = [], months, days })=>{\n const { loadingTitle = '', titleLoaderLabel = '', loadingMessage = '', messageLoaderLabel = '' } = literals ?? {};\n const { Language } = useContext(contextBabylon);\n const [displayedStartDate, setDisplayedStartDate] = useState('');\n const [displayedEndDate, setDisplayedEndDate] = useState('');\n useEffect(()=>{\n if (dates[0] && dates[1]) {\n formatDate(dates[0] || '', 'ddd DD MMM', Language).then(setDisplayedStartDate).catch(console.error);\n formatDate(dates[1] || '', 'ddd DD MMM', Language).then(setDisplayedEndDate).catch(console.error);\n } else if (dates[0] && !dates[1]) {\n formatDate(dates[0] || '', 'dddd, D MMMM YYYY', Language).then(setDisplayedStartDate).catch(console.error);\n setDisplayedEndDate('');\n }\n }, [\n Language,\n dates\n ]);\n const displayedDate = useMemo(()=>{\n if (displayedStartDate && displayedEndDate) {\n return /*#__PURE__*/ jsx(\"p\", {\n children: `${displayedStartDate} → ${displayedEndDate},`\n });\n }\n if (displayedStartDate && !displayedEndDate) {\n return /*#__PURE__*/ jsx(\"p\", {\n children: displayedStartDate\n });\n }\n return null;\n }, [\n displayedEndDate,\n displayedStartDate\n ]);\n return /*#__PURE__*/ jsx(SearcherRedirectingModalWrapper, {\n \"data-testid\": \"SearcherRedirectingModal\",\n visible: visible,\n iconRight: \"\",\n content: /*#__PURE__*/ jsxs(\"div\", {\n children: [\n /*#__PURE__*/ jsx(Image, {\n src: loadingImage ?? `${LOADING.LOADING_SRC}${destination?.value ?? destination?.code}.jpg`,\n alternative: alternative ?? LOADING.LOADING_ALTERNATIVE,\n alt: loadingTitle || titleLoaderLabel,\n isLazy: false,\n width: 450,\n height: 220,\n resize: {\n width: 450,\n height: 220\n }\n }),\n /*#__PURE__*/ jsx(SearcherRedirectingModalLoader, {}),\n /*#__PURE__*/ jsxs(SearcherRedirectingModalContent, {\n children: [\n /*#__PURE__*/ jsx(SearcherRedirectingModalTitle, {\n children: loadingTitle || titleLoaderLabel\n }),\n /*#__PURE__*/ jsxs(SearcherRedirectingModalDescription, {\n children: [\n (!!origin || !!destination) && /*#__PURE__*/ jsxs(\"span\", {\n children: [\n (origin && origin?.text) ?? origin?.label ?? origin?.name,\n origin && destination && ' → ',\n destination?.text || (destination?.label ?? destination?.name)\n ]\n }),\n displayedDate,\n accommodation && /*#__PURE__*/ jsx(\"span\", {\n children: transformAccommodationValueToText(accommodation, literals)\n }),\n passengers && /*#__PURE__*/ jsx(\"span\", {\n children: transformPassengersValueToText(passengers, literals)\n }),\n months && /*#__PURE__*/ jsx(\"div\", {\n children: months.map((month)=>month.label).join(' - ')\n }),\n days && /*#__PURE__*/ jsx(\"div\", {\n children: days.map((day)=>day.label).join(', ')\n })\n ]\n }),\n /*#__PURE__*/ jsx(SearcherRedirectingModalMessage, {\n children: loadingMessage || messageLoaderLabel\n })\n ]\n })\n ]\n })\n });\n};\n\nexport { SearcherRedirectingModal as default };\n"],"names":["LOADING","liverpoolRedirectingModalStyles","css","ModalWrapper","BorderRadius","theme","redirectingModalThemes","createThemes","SearcherRedirectingModalWrapper","styled","Modal","SearcherRedirectingModalLoaderAnimation","keyframes","SearcherRedirectingModalLoader","SearcherRedirectingModalContent","SearcherRedirectingModalTitle","FontMixin","SearcherRedirectingModalDescription","SearcherRedirectingModalMessage","SearcherRedirectingModal","visible","literals","alternative","loadingImage","origin","destination","accommodation","passengers","dates","months","days","loadingTitle","titleLoaderLabel","loadingMessage","messageLoaderLabel","Language","useContext","contextBabylon","displayedStartDate","setDisplayedStartDate","useState","displayedEndDate","setDisplayedEndDate","useEffect","formatDate","displayedDate","useMemo","jsx","jsxs","Image","transformAccommodationValueToText","transformPassengersValueToText","month","day"],"mappings":"qLAAA,MAAMA,EAAU,CACZ,YAAa,8BACb,oBAAqB,2CACzB,ECCMC,EAAkC,CACpC,gCAAiC,IAAkBC,EAAI,CAC/C,GACA,IACA,yFACZ,EAAWC,EAAcC,EAAa,CAC1B,IAAK,KACjB,CAAS,CAAC,EACN,+BAAgC,IAAkBF,EAAI,CAC9C,oBACA,+BACA,KACA,qBACA,+BACA,KACZ,EAAW,CAAC,CAAE,MAAAG,CAAO,IAAGA,EAAM,OAAO,UAAU,QAAS,CAAC,CAAE,MAAAA,CAAO,IAAGA,EAAM,OAAO,UAAU,KAAM,CAAC,CAAE,MAAAA,CAAO,IAAGA,EAAM,MAAM,MAAM,KAAM,CAAC,CAAE,MAAAA,CAAK,IAAKA,EAAM,OAAO,OAAO,QAAS,CAAC,CAAE,MAAAA,CAAO,IAAGA,EAAM,OAAO,QAAQ,IAAI,CACvN,ECjBMC,EAAyBC,EAAa,CACxC,sBAAuBN,CAC3B,CAAC,ECCKO,EAAgDC,EAAOC,CAAK,EAAE,WAAW,CAC3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