{"version":3,"file":"index.tP1jBSZr.js","sources":["../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/components/discount/views/desktop/styled.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/components/discount/views/desktop/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/components/discount/views/mobile/styled.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/components/discount/views/mobile/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/components/discount/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/desktop/themes/styles/logitravel.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/desktop/themes/styles/partnerships.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/desktop/themes/styles/smy.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/desktop/themes/styles/veci.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/desktop/themes/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/desktop/styled.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/desktop/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/mobile/hooks/useAccommodationWithDiscountsMobile.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/mobile/styled.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/views/mobile/index.mjs","../../../../../../../node_modules/@babylon/ui-kit-forms/esm/components/inputs/accommodation/variants/with-discounts/index.mjs"],"sourcesContent":["import { InputWrapper } from '../../../../../../../input/styled.mjs';\nimport Select from '../../../../../../../select/index.mjs';\nimport { FlexMixin, FontMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport { BorderRadius } from '@babylon/ui-kit-styles/common/mixins/logical.styled';\nimport styled from 'styled-components';\n\nconst DiscountWrapper = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"DiscountWrapper\",\n componentId: \"sc-4358d32d-0\"\n})([\n ``,\n ` & > p{`,\n ` color:`,\n `;flex-basis:100%;font-weight:700;margin-bottom:8px;}`\n], FlexMixin({\n wrap: true\n}), FontMixin({\n size: 'base',\n weight: 'bold',\n height: 'medium'\n}), ({ theme })=>theme.colors.grays.darker);\nconst DiscountSelect = /*#__PURE__*/ styled(Select).withConfig({\n displayName: \"DiscountSelect\",\n componentId: \"sc-4358d32d-1\"\n})([\n ``,\n ` border:1px solid `,\n `;`,\n `{--outline-width:1px;--outline-color-default:#e2e2e2;}`\n], BorderRadius({\n all: '4px'\n}), ({ theme })=>theme.colors.grays.light, InputWrapper);\nconst ContainerSelect = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"ContainerSelect\",\n componentId: \"sc-4358d32d-2\"\n})([\n `flex-basis:calc(50% - 8px);&:nth-child(1):nth-last-child(1){flex-basis:100%;}`\n]);\nconst DiscountBody = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"DiscountBody\",\n componentId: \"sc-4358d32d-3\"\n})([\n `flex-basis:100%;`,\n ``\n], FlexMixin({\n justify: 'space-between'\n}));\n\nexport { ContainerSelect, DiscountBody, DiscountSelect, DiscountWrapper };\n","import { jsxs, jsx } from 'react/jsx-runtime';\nimport { DiscountWrapper, DiscountBody, ContainerSelect, DiscountSelect } from './styled.mjs';\n\nconst DiscountDesktop = ({ title, discount, resident, discounts, residents })=>{\n const discountLength = discounts && discounts.items.length > 1;\n const residentsLength = residents && residents.items.length > 1;\n if (!discountLength && !residentsLength) return null;\n return /*#__PURE__*/ jsxs(DiscountWrapper, {\n \"data-testid\": \"Discount\",\n children: [\n /*#__PURE__*/ jsx(\"p\", {\n children: title\n }),\n /*#__PURE__*/ jsxs(DiscountBody, {\n children: [\n discounts && discount && discounts.items.length > 1 && /*#__PURE__*/ jsx(ContainerSelect, {\n children: /*#__PURE__*/ jsx(DiscountSelect, {\n ref: discount.ref,\n onBlur: discount.onBlur,\n value: discount.value,\n onChange: discount.onChange,\n placeholder: discounts.label,\n options: discounts.items\n })\n }),\n residents && resident && residents.items.length > 1 && /*#__PURE__*/ jsx(ContainerSelect, {\n children: /*#__PURE__*/ jsx(DiscountSelect, {\n ref: resident.ref,\n onBlur: resident.onBlur,\n value: resident.value,\n onChange: resident.onChange,\n placeholder: residents.label,\n options: residents.items\n })\n })\n ]\n })\n ]\n });\n};\n\nexport { DiscountDesktop as default };\n","import { FontMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport styled from 'styled-components';\n\nconst DiscountWrapper = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"DiscountWrapper\",\n componentId: \"sc-15ad243f-0\"\n})([\n `padding:16px 16px 8px;margin-top:12px;background-color:`,\n `;border-bottom:2px solid `,\n `;& > p{`,\n ` color:`,\n `;margin-bottom:8px;}`\n], ({ theme })=>theme.colors.white.base, ({ theme })=>theme.colors.primary.lighter, FontMixin({\n size: 'large',\n weight: 'medium',\n height: 'large'\n}), ({ theme })=>theme.colors.grays.darker);\nconst ContainerSelect = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"ContainerSelect\",\n componentId: \"sc-15ad243f-1\"\n})([\n `& > :not(:last-child){border-bottom:1px solid `,\n `;}& .react-select__control{height:56px;padding:0px;}& .react-select__placeholder{position:static;`,\n ` color:`,\n `;}`\n], ({ theme })=>theme.colors.grays.light, FontMixin({\n size: 'base',\n weight: 'light',\n height: 'base'\n}), ({ theme })=>theme.colors.grays.dark);\n\nexport { ContainerSelect, DiscountWrapper };\n","import { jsxs, jsx } from 'react/jsx-runtime';\nimport Select from '../../../../../../../select/index.mjs';\nimport { DiscountWrapper, ContainerSelect } from './styled.mjs';\n\nconst DiscountMobile = ({ title, discount, resident, discounts, residents })=>/*#__PURE__*/ jsxs(DiscountWrapper, {\n \"data-testid\": \"DiscountMobile\",\n children: [\n /*#__PURE__*/ jsx(\"p\", {\n children: title\n }),\n /*#__PURE__*/ jsxs(ContainerSelect, {\n children: [\n discounts && discount && discounts.items.length > 1 && /*#__PURE__*/ jsx(Select, {\n ref: discount.ref,\n onBlur: discount.onBlur,\n value: discount.value,\n onChange: discount.onChange,\n placeholder: discounts.label,\n options: discounts.items,\n enableSearch: false,\n variant: \"horizontal\",\n menuVariant: \"floating\"\n }),\n residents && resident && residents.items.length > 1 && /*#__PURE__*/ jsx(Select, {\n ref: resident.ref,\n onBlur: resident.onBlur,\n value: resident.value,\n onChange: resident.onChange,\n placeholder: residents.label,\n options: residents.items,\n variant: \"horizontal\",\n enableSearch: false,\n menuVariant: \"floating\"\n })\n ]\n })\n ]\n });\n\nexport { DiscountMobile as default };\n","import { generateViewsComponent } from '@babylon/ui-kit-helpers/views';\nimport DiscountDesktop from './views/desktop/index.mjs';\nimport DiscountMobile from './views/mobile/index.mjs';\n\nconst Discount = generateViewsComponent(DiscountDesktop, DiscountMobile);\n\nexport { Discount as default };\n","import { css } from 'styled-components';\n\nconst logitravelAccommodationWithDiscountsDesktopStyles = {\n InputPanelFooter: ()=>/*#__PURE__*/ css([\n `& > .panel-error{background-color:`,\n `;}`\n ], ({ theme })=>theme.colors.primary.lightest)\n};\n\nexport { logitravelAccommodationWithDiscountsDesktopStyles as default };\n","import { css } from 'styled-components';\n\nconst partnershipsAccommodationWithDiscountsDesktopStyles = {\n InputPanelFooter: ()=>/*#__PURE__*/ css([\n `& > .panel-error{background-color:`,\n `;}`\n ], ({ theme })=>theme.colors.secondary.light)\n};\n\nexport { partnershipsAccommodationWithDiscountsDesktopStyles as default };\n","import { css } from 'styled-components';\n\nconst smyAccommodationWithDiscountsDesktopStyles = {\n InputPanelFooter: ()=>/*#__PURE__*/ css([\n `& > .panel-error{background-color:`,\n `;}`\n ], ({ theme })=>theme.colors.primary.lightest)\n};\n\nexport { smyAccommodationWithDiscountsDesktopStyles as default };\n","import { css } from 'styled-components';\n\nconst veciAccommodationWithDiscountsDesktopStyles = {\n InputPanelFooter: ()=>/*#__PURE__*/ css([\n `border-top-color:`,\n `;& > .panel-error{background-color:`,\n `;}`\n ], ({ theme })=>theme.colors.grays.lightest, ({ theme })=>theme.colors.primary.lightest)\n};\n\nexport { veciAccommodationWithDiscountsDesktopStyles as default };\n","import { createThemes } from '@babylon/ui-kit-styles/common/themes';\nimport logitravelAccommodationWithDiscountsDesktopStyles from './styles/logitravel.mjs';\nimport partnershipsAccommodationWithDiscountsDesktopStyles from './styles/partnerships.mjs';\nimport smyAccommodationWithDiscountsDesktopStyles from './styles/smy.mjs';\nimport veciAccommodationWithDiscountsDesktopStyles from './styles/veci.mjs';\n\nconst accommodationWithDiscountsDesktopThemes = createThemes({\n logitravel: logitravelAccommodationWithDiscountsDesktopStyles,\n partnerships: partnershipsAccommodationWithDiscountsDesktopStyles,\n smy: smyAccommodationWithDiscountsDesktopStyles,\n veci: veciAccommodationWithDiscountsDesktopStyles\n});\n\nexport { accommodationWithDiscountsDesktopThemes as default };\n","import { FlexMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport styled from 'styled-components';\nimport { DiscountWrapper } from '../../components/discount/views/desktop/styled.mjs';\nimport accommodationWithDiscountsDesktopThemes from './themes/index.mjs';\n\nconst Header = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"Header\",\n componentId: \"sc-9915f6b3-0\"\n})([\n ``,\n ` display:flex;& > p{margin-right:15px;}& > button{margin-left:auto;white-space:nowrap;}`\n], FlexMixin({\n align: 'center',\n justify: 'space-between'\n}));\nconst InputPanelFooter = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"InputPanelFooter\",\n componentId: \"sc-9915f6b3-1\"\n})([\n `border-top:1px solid `,\n `;& > .panel-error{padding:16px;background-color:`,\n `;}`,\n `{padding:16px;}`,\n ``\n], ({ theme })=>theme.colors.grays.light, ({ theme })=>theme.colors.primary.lightest, DiscountWrapper, accommodationWithDiscountsDesktopThemes('InputPanelFooter'));\n\nexport { Header, InputPanelFooter };\n","import { jsxs, jsx } from 'react/jsx-runtime';\nimport PanelAccommodation from '../../../../components/panel-accommodation/index.mjs';\nimport InputPanel from '../../../../../../others/input-panel/index.mjs';\nimport { forwardRef, useMemo } from 'react';\nimport AddRoom from '../../../../components/add-room/index.mjs';\nimport PanelErrorDesktop from '../../../../components/panel-accommodation/components/panel-error/views/desktop/index.mjs';\nimport useAccommodation from '../../../../hooks/useAccommodation.mjs';\nimport Discount from '../../components/discount/index.mjs';\nimport { Header, InputPanelFooter } from './styled.mjs';\n\nconst AccommodationWithDiscountsDesktop = /*#__PURE__*/ forwardRef((props, ref)=>{\n const { literals, discount, discounts, resident, residents, tooltipOptions, disableAges = false } = props;\n const { addRoom = '', accommodationTitle = '', discountTitle = '', accommodationLabel = '' } = literals ?? {};\n const { inputProps, panelRooms, config, people, goToLast, hasError, error, onAddRoom, onChangeRooms } = useAccommodation(props);\n const hasDiscounts = !!(discount && discounts) || !!(resident && residents);\n const headerTitle = accommodationTitle || accommodationLabel;\n const panel = useMemo(()=>({\n header: /*#__PURE__*/ jsxs(Header, {\n children: [\n headerTitle && /*#__PURE__*/ jsx(\"p\", {\n children: headerTitle\n }),\n /*#__PURE__*/ jsx(AddRoom, {\n addRoom: addRoom,\n onAddRoom: onAddRoom,\n hasError: hasError\n })\n ]\n }),\n content: /*#__PURE__*/ jsx(PanelAccommodation, {\n config: config,\n onChange: onChangeRooms,\n people: people,\n rooms: panelRooms,\n error: error,\n goToLast: goToLast,\n disableAges: disableAges\n }),\n footer: (hasDiscounts || error) && /*#__PURE__*/ jsxs(InputPanelFooter, {\n children: [\n error && /*#__PURE__*/ jsx(PanelErrorDesktop, {\n error: error\n }),\n hasDiscounts && /*#__PURE__*/ jsx(Discount, {\n title: discountTitle,\n discount: discount,\n resident: resident,\n discounts: discounts,\n residents: residents\n })\n ]\n })\n }), [\n addRoom,\n config,\n disableAges,\n discount,\n discountTitle,\n discounts,\n error,\n goToLast,\n hasDiscounts,\n hasError,\n headerTitle,\n onAddRoom,\n onChangeRooms,\n panelRooms,\n people,\n resident,\n residents\n ]);\n const tooltipProps = useMemo(()=>({\n options: tooltipOptions\n }), [\n tooltipOptions\n ]);\n return /*#__PURE__*/ jsx(\"div\", {\n \"data-testid\": \"AccommodationWithDiscounts\",\n children: /*#__PURE__*/ jsx(InputPanel, {\n ref: ref,\n inputProps: inputProps,\n footerVariant: \"noStyle\",\n panel: panel,\n tooltipProps: tooltipProps\n })\n });\n});\nAccommodationWithDiscountsDesktop.displayName = 'AccommodationWithDiscountsDesktop';\n\nexport { AccommodationWithDiscountsDesktop as default };\n","import useAccommodationMobile from '../../../../../hooks/useAccommodationMobile.mjs';\nimport { useState, useEffect, useCallback } from 'react';\n\nconst useAccommodationWithDiscountsMobile = (props)=>{\n const { value, discount, resident } = props;\n const { inputProps, isOpen, config, people, panelRooms, hasError, error, goToLast, onChangeRooms, onAddRoom, onAccept, setIsOpen } = useAccommodationMobile(props);\n const [tempDiscount, setTempDiscount] = useState(discount?.value);\n const [tempResident, setTempResident] = useState(resident?.value);\n useEffect(()=>{\n if (!isOpen) {\n setTempDiscount(discount?.value);\n setTempResident(resident?.value);\n }\n }, [\n discount?.value,\n error,\n isOpen,\n resident?.value,\n value\n ]);\n const onAcceptWithDiscounts = useCallback((close)=>()=>{\n discount?.onChange?.(tempDiscount, {\n action: 'select-option',\n option: tempDiscount\n });\n resident?.onChange?.(tempResident, {\n action: 'select-option',\n option: tempResident\n });\n onAccept(close)();\n }, [\n discount,\n onAccept,\n resident,\n tempDiscount,\n tempResident\n ]);\n return {\n inputProps,\n isOpen,\n config,\n people,\n panelRooms,\n tempDiscount,\n tempResident,\n hasError,\n error,\n goToLast,\n onAccept: onAcceptWithDiscounts,\n setIsOpen,\n onChangeRooms,\n onAddRoom,\n setTempDiscount,\n setTempResident\n };\n};\n\nexport { useAccommodationWithDiscountsMobile as default };\n","import { FlexMixin, FontMixin } from '@babylon/ui-kit-styles/common/mixins/helpers.styled';\nimport styled from 'styled-components';\nimport { AddRoomButton } from '../../../../components/add-room/styled.mjs';\n\nconst AccommodationPanelWrapper = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"AccommodationPanelWrapper\",\n componentId: \"sc-d117bbed-0\"\n})([\n `overflow:hidden;`,\n ` flex:1 1 auto;`\n], FlexMixin({\n direction: 'column',\n justify: 'space-between'\n}));\nconst AccommodationPanelContent = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"AccommodationPanelContent\",\n componentId: \"sc-d117bbed-1\"\n})([\n `flex:1 1 auto;`,\n ` overflow-y:auto;background-color:`,\n `;`\n], FlexMixin({\n direction: 'column'\n}), ({ theme })=>theme.bodyBgColor);\nconst AccommodationPanelBody = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"AccommodationPanelBody\",\n componentId: \"sc-d117bbed-2\"\n})([\n ``,\n ` gap:16px;`\n], FlexMixin({\n direction: 'column'\n}));\nconst AccommodationPanelFooter = /*#__PURE__*/ styled.div.withConfig({\n displayName: \"AccommodationPanelFooter\",\n componentId: \"sc-d117bbed-3\"\n})([\n `gap:8px;& > button{color:`,\n `;`,\n ` &:hover{color:`,\n `;}}`,\n `{padding:16px;color:`,\n `;text-transform:uppercase;`,\n `}`\n], ({ theme })=>theme.colors.primary.light, FontMixin({\n size: 'base',\n weight: 'medium'\n}), ({ theme })=>theme.colors.primary.base, AddRoomButton, ({ theme })=>theme.colors.primary.light, FontMixin({\n size: 'medium',\n weight: 'medium',\n height: 'medium'\n}));\n\nexport { AccommodationPanelBody, AccommodationPanelContent, AccommodationPanelFooter, AccommodationPanelWrapper };\n","import { jsx, jsxs } from 'react/jsx-runtime';\nimport { ButtonPanel } from '@babylon/ui-kit-base/components/buttons/button';\nimport PanelAccommodation from '../../../../components/panel-accommodation/index.mjs';\nimport InputPanel from '../../../../../../others/input-panel/index.mjs';\nimport { forwardRef, useCallback, useMemo } from 'react';\nimport AddRoom from '../../../../components/add-room/index.mjs';\nimport PanelErrorMobile from '../../../../components/panel-accommodation/components/panel-error/views/mobile/index.mjs';\nimport Discount from '../../components/discount/index.mjs';\nimport useAccommodationWithDiscountsMobile from './hooks/useAccommodationWithDiscountsMobile.mjs';\nimport { AccommodationPanelWrapper, AccommodationPanelContent, AccommodationPanelFooter } from './styled.mjs';\n\nconst AccommodationWithDiscountsMobile = /*#__PURE__*/ forwardRef((props, ref)=>{\n const { literals, discounts, residents, disableAges = false } = props;\n const { addRoom = '', accommodationTitle = '', accept = '', discountTitle = '', accommodationLabel = '' } = literals ?? {};\n const { inputProps, config, people, panelRooms, tempDiscount, tempResident, goToLast, hasError, error, onAccept, setIsOpen, onAddRoom, onChangeRooms, setTempDiscount, setTempResident } = useAccommodationWithDiscountsMobile(props);\n const renderFooter = useCallback(({ close })=>/*#__PURE__*/ jsx(ButtonPanel, {\n onClick: onAccept(close),\n children: accept\n }), [\n accept,\n onAccept\n ]);\n const discount = useMemo(()=>({\n value: tempDiscount,\n onChange: setTempDiscount\n }), [\n setTempDiscount,\n tempDiscount\n ]);\n const resident = useMemo(()=>({\n value: tempResident,\n onChange: setTempResident\n }), [\n setTempResident,\n tempResident\n ]);\n const panel = useMemo(()=>({\n onChange: setIsOpen,\n header: accommodationTitle || accommodationLabel,\n beforeContent: error && /*#__PURE__*/ jsx(PanelErrorMobile, {\n error: error\n }),\n content: /*#__PURE__*/ jsx(AccommodationPanelWrapper, {\n \"data-testid\": \"AccommodationPanel\",\n children: /*#__PURE__*/ jsxs(AccommodationPanelContent, {\n children: [\n /*#__PURE__*/ jsx(PanelAccommodation, {\n config: config,\n onChange: onChangeRooms,\n people: people,\n rooms: panelRooms,\n error: error,\n goToLast: goToLast,\n disableAges: disableAges\n }),\n /*#__PURE__*/ jsx(AccommodationPanelFooter, {\n children: /*#__PURE__*/ jsx(AddRoom, {\n addRoom: addRoom,\n onAddRoom: onAddRoom,\n hasError: hasError\n })\n }),\n discounts && /*#__PURE__*/ jsx(AccommodationPanelFooter, {\n children: /*#__PURE__*/ jsx(Discount, {\n title: discountTitle,\n discounts: discounts,\n residents: residents,\n discount: discount,\n resident: resident\n })\n })\n ]\n })\n }),\n footer: renderFooter\n }), [\n accommodationLabel,\n accommodationTitle,\n addRoom,\n config,\n disableAges,\n discount,\n discountTitle,\n discounts,\n error,\n goToLast,\n hasError,\n onAddRoom,\n onChangeRooms,\n panelRooms,\n people,\n renderFooter,\n resident,\n residents,\n setIsOpen\n ]);\n const modalProps = useMemo(()=>({\n color: 'primary'\n }), []);\n return /*#__PURE__*/ jsx(\"div\", {\n \"data-testid\": \"AccommodationWithDiscounts\",\n children: /*#__PURE__*/ jsx(InputPanel, {\n ref: ref,\n inputProps: inputProps,\n panel: panel,\n modalProps: modalProps\n })\n });\n});\nAccommodationWithDiscountsMobile.displayName = 'AccommodationWithDiscountsMobile';\n\nexport { AccommodationWithDiscountsMobile as default };\n","import { jsx } from 'react/jsx-runtime';\nimport { useInput } from '../../../../../hooks/useInput/index.mjs';\nimport { generateViewsComponent } from '@babylon/ui-kit-helpers/views';\nimport { forwardRef } from 'react';\nimport AccommodationWithDiscountsDesktop from './views/desktop/index.mjs';\nimport AccommodationWithDiscountsMobile from './views/mobile/index.mjs';\n\nconst AccommodationWithDiscountsView = generateViewsComponent(AccommodationWithDiscountsDesktop, AccommodationWithDiscountsMobile);\nconst AccommodationWithDiscounts = /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ jsx(AccommodationWithDiscountsView, {\n ...props,\n ref: ref\n }));\nAccommodationWithDiscounts.displayName = 'AccommodationWithDiscounts';\nconst FormAccommodationWithDiscounts = (props)=>{\n const { isHiddenRequired: _isHiddenRequired, ...rest } = props;\n const { field, label, error, hasError } = useInput(props);\n const { field: discountField, error: discountError, hasError: discountHasError } = useInput(props.discount);\n const { field: residentField, error: residentError, hasError: residentHasError } = useInput(props.resident);\n return /*#__PURE__*/ jsx(AccommodationWithDiscounts, {\n ...rest,\n ...field,\n discount: discountField,\n resident: residentField,\n label: label,\n hasError: hasError || discountHasError || residentHasError,\n error: error ?? discountError ?? residentError\n });\n};\n\nexport { FormAccommodationWithDiscounts, AccommodationWithDiscounts as default };\n"],"names":["DiscountWrapper","styled","FlexMixin","FontMixin","theme","DiscountSelect","Select","BorderRadius","InputWrapper","ContainerSelect","DiscountBody","DiscountDesktop","title","discount","resident","discounts","residents","discountLength","residentsLength","jsxs","jsx","DiscountMobile","Discount","generateViewsComponent","logitravelAccommodationWithDiscountsDesktopStyles","css","partnershipsAccommodationWithDiscountsDesktopStyles","smyAccommodationWithDiscountsDesktopStyles","veciAccommodationWithDiscountsDesktopStyles","accommodationWithDiscountsDesktopThemes","createThemes","Header","InputPanelFooter","AccommodationWithDiscountsDesktop","forwardRef","props","ref","literals","tooltipOptions","disableAges","addRoom","accommodationTitle","discountTitle","accommodationLabel","inputProps","panelRooms","config","people","goToLast","hasError","error","onAddRoom","onChangeRooms","useAccommodation","hasDiscounts","headerTitle","panel","useMemo","AddRoom","PanelAccommodation","PanelErrorDesktop","tooltipProps","InputPanel","useAccommodationWithDiscountsMobile","value","isOpen","onAccept","setIsOpen","useAccommodationMobile","tempDiscount","setTempDiscount","useState","tempResident","setTempResident","useEffect","onAcceptWithDiscounts","useCallback","close","_a","_b","AccommodationPanelWrapper","AccommodationPanelContent","AccommodationPanelFooter","AddRoomButton","AccommodationWithDiscountsMobile","accept","renderFooter","ButtonPanel","PanelErrorMobile","modalProps","AccommodationWithDiscountsView","AccommodationWithDiscounts","FormAccommodationWithDiscounts","_isHiddenRequired","rest","field","label","useInput","discountField","discountError","discountHasError","residentField","residentError","residentHasError"],"mappings":"yOAMA,MAAMA,EAAgCC,EAAO,IAAI,WAAW,CACxD,YAA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