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,OAA6CrJ,EAAAA,EAAAA,MAArCR,EAAU,EAAVA,WAAYC,EAAM,EAANA,OAAQC,EAAY,EAAZA,aAE5B,OAAOQ,EAAAA,EAAAA,KAA4D,WACjE,OAAKV,EAYE,EARKS,EAAAA,EAAAA,GAAW,cAAD,OAAeT,EAAU,kBAAkBE,GACjC,CAC9BD,OAAAA,EACA6J,OAAQ,EAAF,GACAD,GAAW,CAAEA,QAASA,EAAQ/D,eAP7B,IAYX,GACF,CDpB0BiE,CADiB,EAAPF,SAC1BtJ,EAAI,EAAJA,KAAMiG,EAAK,EAALA,MAERwD,GAAazJ,IAASiG,EAE5B,OACE,SAAC,KAAa,CAAC/K,MAAO,CAAEwO,MAAuB,QAAlB,EAAE1J,aAAI,EAAJA,EAAMsB,kBAAU,QAAI,GAAImI,UAAAA,GAAY,UACjE,SAACE,EAAA,EAAc,WACb,SAACxB,GAAc,OAIvB,C","sources":["webpack://orisubscriptionwizard/./src/AutoshipWizard/pages/CustomerSelection/CustomerSelectionForm.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/constants/frequencies.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/pages/CustomerSelection/FrequencySelection.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/pages/CustomerSelection/index.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/components/PriceReview.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/components/ReviewSection.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/components/TermsAndConditions.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/utils/format-name.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/hooks/useCustomerReview.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/hooks/useCustomerProfile.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/hooks/useRecurringPaymentCards.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/icons/MasterCard.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/icons/Other.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/icons/Visa.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/icons/Maestro.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/components/CardNumber.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/pages/SubscriptionReview/SubscriptionReview.tsx","webpack://orisubscriptionwizard/./src/AutoshipWizard/pages/index.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/hooks/useDeliveryAddress.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/hooks/useAutoshipLegalArticles.ts","webpack://orisubscriptionwizard/./src/AutoshipWizard/AutoshipWizard.tsx","webpack://orisubscriptionwizard/./src/shared/containers/AutoshipContainer.tsx","webpack://orisubscriptionwizard/./src/shared/hooks/useAutoshipTypes.ts"],"sourcesContent":["import { Typography } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport type { DetailedHTMLProps, FormEvent, HTMLProps } from 'react';\nimport { forwardRef, useCallback, useContext } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { MyselfSection, OtherCustomersSection } from '../../../shared/components';\nimport { localization } from '../../../shared/constants';\nimport { stateContext } from '../../../shared/contexts';\nimport { FormGrid } from '../../../shared/styled';\nimport { ECustomerTypeSelection } from '../../../shared/types';\n\nexport const CustomerSelectionForm = forwardRef<\n HTMLFormElement,\n DetailedHTMLProps, HTMLFormElement>\n>(({ onChange }, ref) => {\n const { getTestIdProps } = useTestId();\n const { selectedCustomerType, setCustomerType } = useContext(stateContext);\n const handleChange = useCallback(\n ({ currentTarget: { value } }: FormEvent) => {\n setCustomerType(value as ECustomerTypeSelection);\n },\n [setCustomerType],\n );\n\n return (\n \n \n \n \n \n \n \n );\n});\n","import { localization } from '~/shared/constants';\nimport type { Frequency } from '~/shared/types/Frequency';\n\nexport const frequencies: Frequency[] = [\n {\n Message: { id: 'everyCatalogue', defaultMessage: localization.everyCatalogue },\n Value: 1,\n },\n {\n Message: {\n id: 'everySecondCatalogue',\n defaultMessage: localization.everySecondCatalogue,\n },\n Value: 2,\n },\n {\n Message: {\n id: 'everyThirdCatalogue',\n defaultMessage: localization.everyThirdCatalogue,\n },\n Value: 3,\n },\n];\n","import type { SelectChangeEvent } from '@ori-ui/mui';\nimport { Typography, styled } from '@ori-ui/mui';\nimport type { DetailedHTMLProps, HTMLProps } from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { localization } from '../../../shared/constants';\nimport { frequencies } from '~/AutoshipWizard/constants/frequencies';\nimport { SelectField } from '~/shared/components';\nimport { stateContext } from '~/shared/contexts';\n\nconst FormGrid = styled('form')(({ theme }) => ({\n display: 'grid',\n rowGap: theme.spacing(1),\n}));\n\nexport const FrequencySelection = forwardRef<\n HTMLFormElement,\n DetailedHTMLProps, HTMLFormElement>\n>(({ onChange }, ref) => {\n const { formatMessage } = useIntl();\n const { setFrequency, selectedFrequency } = useContext(stateContext);\n\n const selectFrequency = formatMessage({\n id: 'selectFrequency',\n defaultMessage: localization.selectFrequency,\n });\n\n const handleChange = (event: SelectChangeEvent) => {\n const frequencyToSave = frequencies.find((frequency) => frequency.Value === event.target.value);\n setFrequency(frequencyToSave);\n };\n\n const mapFrequencies = frequencies.map(({ Value, Message }) => ({\n Id: Value,\n Text: formatMessage(Message),\n }));\n\n return (\n \n \n {selectFrequency}\n \n \n \n );\n});\n","import { styled, Button } from '@ori-ui/mui';\nimport { useContext } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { localization } from '../../../shared/constants';\nimport { stateContext } from '../../../shared/contexts';\nimport { CustomerSelectionForm } from './CustomerSelectionForm';\nimport { FrequencySelection } from './FrequencySelection';\n\nconst StyledCustomerSelection = styled('div')(({ theme }) => ({\n display: 'grid',\n rowGap: theme.spacing(3),\n marginTop: theme.spacing(3),\n width: '100%',\n overflow: 'visible',\n}));\n\nexport function CustomerSelection() {\n const { isCustomerSelectionValid, selectedFrequency, goToSummary } = useContext(stateContext);\n\n return (\n \n \n \n \n \n \n \n );\n}\n","import { styled, Typography } from '@ori-ui/mui';\nimport type { FC, ReactChild } from 'react';\nimport { memo } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { localization } from '../../shared/constants';\n\ninterface ReviewPriceProps {\n readonly action?: ReactChild;\n readonly price?: string;\n readonly labelKey: keyof typeof localization;\n}\n\nconst ReviewPrice = styled('div')(({ theme }) => ({\n display: 'grid',\n gridTemplateAreas: `\n \"label price action\"\n `,\n gridTemplateColumns: '1fr auto auto',\n alignItems: 'center',\n columnGap: theme.spacing(1),\n}));\n\nconst PriceReviewComponent: FC = ({ labelKey, price, action }) => (\n \n \n \n \n \n \n \n {price}\n \n
{action}
\n
\n);\n\nconst PriceReview = memo(PriceReviewComponent);\n\nexport default PriceReview;\n","import { styled, Typography } from '@ori-ui/mui';\nimport React, { memo } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { localization } from '../../shared/constants';\n\ninterface ReviewSectionProps {\n readonly reviewAction?: React.ReactChild;\n readonly reviewContent?: React.ReactChild;\n readonly labelKey: keyof typeof localization;\n}\n\nconst StyledReviewSection = styled('div')(({ theme }) => ({\n display: 'grid',\n gridTemplateAreas: `\n \"review-label review-action\"\n \"review-content review-action\"\n `,\n gridTemplateColumns: '1fr auto',\n rowGap: theme.spacing(1),\n}));\n\nconst ReviewAction = styled('div')`\n align-self: 'center';\n justify-self: 'center';\n grid-area: review-action;\n`;\n\nconst ReviewSectionComponent = ({ reviewAction, reviewContent, labelKey }: ReviewSectionProps) => {\n if (typeof reviewContent === 'undefined') {\n return null;\n }\n\n return (\n \n \n \n \n {reviewContent}\n {reviewAction}\n \n );\n};\n\nconst ReviewSection = memo(ReviewSectionComponent);\n\nexport default ReviewSection;\n","import type { CheckboxProps } from '@ori-ui/mui';\nimport { styled, Checkbox } from '@ori-ui/mui';\nimport type { FC } from 'react';\nimport { memo } from 'react';\n\nconst StyledTermsAndConditions = styled('div')(({ theme }) => ({\n display: 'grid',\n gridTemplateAreas: `\n \"terms-checkbox terms-text\"\n `,\n gridTemplateColumns: 'auto 1fr',\n columnGap: theme.spacing(1),\n alignItems: 'center',\n}));\n\nconst TermsAndConditionsComponent: FC> = ({\n children,\n checked,\n onChange,\n}) => (\n \n \n
{children}
\n
\n);\n\nexport const TermsAndConditions: FC> = memo(\n TermsAndConditionsComponent,\n);\n\nexport default TermsAndConditions;\n","export function formatName(firstName?: string, lastName?: string): string {\n return `${firstName} ${lastName}`;\n}\n","import { useContext } from 'react';\n\nimport { stateContext } from '../../shared/contexts';\nimport { ECustomerTypeSelection } from '../../shared/types';\nimport { formatName } from '../utils';\nimport { useCustomerProfile } from './useCustomerProfile';\n\nexport function useCustomerReview() {\n const { selectedCustomerType, existingCustomer, newCustomer } = useContext(stateContext);\n const { data } = useCustomerProfile();\n if (selectedCustomerType === ECustomerTypeSelection.ExistingCustomer) {\n return `${existingCustomer?.firstName} ${existingCustomer?.lastName}`;\n }\n if (selectedCustomerType === ECustomerTypeSelection.NewCustomer) {\n return formatName(newCustomer?.firstName, newCustomer?.surname);\n }\n\n return formatName(data?.firstName, data?.lastName);\n}\n","import type { ApiModels } from '@ori/global-api-client';\nimport useSWR from 'swr';\n\nimport { useConfiguration } from '~/shared/contexts/configurationContext';\nimport type { ApiError } from '~/shared/models/ApiError';\nimport type { FetcherOptions } from '~/shared/types/FetcherOptions';\nimport { getSafeUrl } from '~/shared/utils/getSafeUrl';\n\nexport function useCustomerProfile() {\n const { customerId, tenant, globalApiUrl } = useConfiguration();\n\n const url = getSafeUrl(`/customers/${customerId}/profile`, globalApiUrl);\n const options: FetcherOptions = {\n tenant,\n };\n\n return useSWR([url, options]);\n}\n","import type { ApiModels } from '@ori/global-api-client';\nimport useSWR from 'swr';\n\nimport { useConfiguration } from '~/shared/contexts/configurationContext';\nimport type { ApiError } from '~/shared/models/ApiError';\nimport type { FetcherOptions } from '~/shared/types/FetcherOptions';\nimport { getSafeUrl } from '~/shared/utils/getSafeUrl';\n\nexport function useRecurringPaymentCards() {\n const { customerId, tenant, globalApiUrl } = useConfiguration();\n\n return useSWR(\n () => {\n if (!customerId) {\n return null;\n }\n\n const url = getSafeUrl(`/customers/${customerId}/recurringPaymentCards`, globalApiUrl);\n const options: FetcherOptions = {\n tenant,\n };\n\n return [url, options];\n },\n { revalidateOnFocus: false },\n );\n}\n","import type { SvgIconProps } from '@ori-ui/mui';\nimport { SvgIcon } from '@ori-ui/mui';\n\nexport function MasterCard(props: SvgIconProps) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import type { SvgIconProps } from '@ori-ui/mui';\nimport { SvgIcon } from '@ori-ui/mui';\n\nexport function Other(props: SvgIconProps) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import type { SvgIconProps } from '@ori-ui/mui';\nimport { SvgIcon } from '@ori-ui/mui';\n\nexport function Visa(props: SvgIconProps) {\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","import type { SvgIconProps } from '@ori-ui/mui';\nimport { SvgIcon } from '@ori-ui/mui';\n\nexport function Maestro(props: SvgIconProps) {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import useTestId from '@ori/testid-generator';\nimport type { VFC } from 'react';\n\nimport { useRecurringPaymentCards } from '../hooks/useRecurringPaymentCards';\n\nconst componentName = 'card-number';\n\nexport const CardNumber: VFC = () => {\n const { getTestIdProps } = useTestId();\n const { data } = useRecurringPaymentCards();\n const cardNumber = data?.collection[0];\n\n if (!cardNumber) {\n return null;\n }\n\n const { cardNumberLast4, expiryMonth, expiryYear } = cardNumber;\n\n return (\n {`**** **** **** ${cardNumberLast4} ${expiryMonth}/${expiryYear}`}\n );\n};\n","import { RestError } from '@azure/ms-rest-js';\nimport type { EventData as ErrorEventData } from '@ori-events/subscription-error';\nimport type { EventData } from '@ori-events/subscription-saved';\nimport { InfoCircle, PenFilled } from '@ori-ui/icons';\nimport { Button, IconButton, Link, styled, Tooltip, Typography } from '@ori-ui/mui';\nimport type { ApiModels } from '@ori/global-api-client';\nimport { useCallback, useContext, useState } from 'react';\nimport { FormattedMessage, useIntl } from 'react-intl';\n\nimport { ModalContent } from '../../../shared/components';\nimport { localization } from '../../../shared/constants';\nimport { stateContext, wizardContext } from '../../../shared/contexts';\nimport { PriceReview, ReviewSection, TermsAndConditions } from '../../components';\nimport { useCustomerReview } from '../../hooks';\nimport { useAutoshipLegalArticles } from '../../hooks/useAutoshipLegalArticles';\nimport { useDeliveryAddress } from '../../hooks/useDeliveryAddress';\nimport { useRecurringPaymentCards } from '../../hooks/useRecurringPaymentCards';\nimport { Maestro, MasterCard, Other, Visa } from '../../icons';\nimport { CardNumber } from '~/AutoshipWizard/components/CardNumber';\nimport { useConfiguration } from '~/shared/contexts/configurationContext';\nimport { ECustomerTypeSelection, EWizardType } from '~/shared/types';\nimport type { ECardTypes } from '~/shared/types/ECardTypes';\nimport { client } from '~/shared/utils/fetcher';\nimport { getSafeUrl } from '~/shared/utils/getSafeUrl';\nimport { getToken } from '~/shared/utils/getToken';\n\nconst PrivacyPolicy = styled(Link)(({ theme }) => ({\n paddingLeft: theme.spacing(1),\n}));\n\nconst cardIcons = {\n Visa: ,\n MasterCard: ,\n Maestro: ,\n Other: ,\n};\n\nconst resolveCardImage = (cardType: ECardTypes) => cardIcons[cardType as keyof typeof ECardTypes];\n\nexport function SubscriptionReviewPage() {\n const {\n selectedPackage,\n selectedFrequency,\n selectedCustomerType,\n termsAndConditionsAccepted,\n existingCustomer,\n newCustomer,\n setTermsAndConditions,\n setCurrentStep,\n } = useContext(stateContext);\n\n const { data: recurringPaymentCardsData } = useRecurringPaymentCards();\n const { data: customerAddresses } = useDeliveryAddress();\n const { data: termsAndPrivacyData } = useAutoshipLegalArticles();\n const content = useCustomerReview();\n const { onClose, onSave, onError, productCode } = useContext(wizardContext);\n const { customerId, globalApiUrl, identityUrl, placement, tenant, uriTemplate } =\n useConfiguration();\n const [isDisabled, setIsDisabled] = useState(false);\n const { formatMessage } = useIntl();\n\n const customerIdToPost =\n selectedCustomerType === ECustomerTypeSelection.ExistingCustomer\n ? existingCustomer?.endConsumerId\n : null;\n\n const token = getToken({ tenant, identityUrl });\n\n const customerAddress: string | undefined = customerAddresses?.customerAddressesCollection.map(\n (address: ApiModels.GlobalCustomersAddressDto) =>\n address.isPrimary\n ? `${address.streetAddress} ${address.area} ${address.city} ${address.zipcode} ${address.country}`\n : undefined,\n )[0];\n\n const postAutoship = useCallback(async () => {\n setIsDisabled(true);\n const autoshipInstructionsToPost: ApiModels.GlobalCustomersAutoshipInstructionDto = {\n newConsumer: newCustomer\n ? {\n firstName: newCustomer.firstName,\n lastName: newCustomer.surname,\n }\n : undefined,\n existingConsumerId: customerIdToPost ?? undefined,\n packageId: selectedPackage ? selectedPackage.packageId : 0,\n frequency: Number(selectedFrequency?.Value),\n status: 'Finished',\n };\n try {\n const autoshipInstructionsUrl = getSafeUrl(\n `/customers/${customerId}/autoshipInstructions`,\n globalApiUrl,\n );\n\n const { data } = await client.post(\n autoshipInstructionsUrl,\n { ...autoshipInstructionsToPost },\n {\n headers: {\n 'Content-Type': 'application/json',\n 'x-placement': placement,\n 'x-referer': uriTemplate,\n 'x-tenant-context': tenant,\n authorization: (await token).toString(),\n },\n },\n );\n\n const detail: EventData = {\n type: EWizardType.Autoship,\n productCode,\n subscriptionId: Number(data.newAutoshipId),\n orderId: data.newOrderId,\n paymentProviderId: data.paymentProviderId,\n paymentId: data.paymentId,\n };\n onSave({ detail });\n onClose();\n } catch (error: unknown) {\n if (error instanceof RestError) {\n const detail: ErrorEventData = {\n type: EWizardType.Autoship,\n error: {\n code: Number(error.response?.status),\n message: String(error.body),\n },\n };\n onError({ detail });\n onClose();\n }\n if (error === 'Missing payment details') {\n const detail: ErrorEventData = {\n type: EWizardType.Autoship,\n error: {\n code: 418,\n message: 'Missing payment details',\n },\n };\n onError({ detail });\n onClose();\n }\n }\n }, [\n globalApiUrl,\n customerId,\n customerIdToPost,\n newCustomer,\n onClose,\n onError,\n onSave,\n placement,\n productCode,\n selectedFrequency?.Value,\n selectedPackage,\n tenant,\n token,\n uriTemplate,\n ]);\n\n const moveToStep = (stepNumber: number) => () => setCurrentStep(stepNumber);\n\n const firstRecurringPayment = recurringPaymentCardsData?.collection[0];\n\n return (\n \n \n \n \n }\n />\n \n \n \n }\n />\n \n \n \n }\n />\n \n }\n >\n \n \n \n \n }\n />\n \n }\n />\n {firstRecurringPayment ? (\n }\n reviewAction={\n
\n {resolveCardImage(firstRecurringPayment.cardType as ECardTypes)}\n
\n }\n />\n ) : null}\n {selectedPackage && 'totalPriceForTheFirstStep' in selectedPackage ? (\n \n }\n >\n \n \n \n \n }\n />\n ) : null}\n \n \n \n \n
\n \n {termsAndPrivacyData?.termsAndConditions?.title}\n \n \n {termsAndPrivacyData?.privacyPolicy?.title}\n \n
\n \n \n \n \n
\n );\n}\n","import { CustomerSelection } from './CustomerSelection';\nimport { SubscriptionReviewPage } from './SubscriptionReview';\nimport { PackageSelection } from '~/shared/components/PackageSelection';\n\nexport const Pages = [PackageSelection, CustomerSelection, SubscriptionReviewPage] as const;\n","import type { ApiModels } from '@ori/global-api-client';\nimport useSWR from 'swr';\n\nimport { useConfiguration } from '~/shared/contexts/configurationContext';\nimport type { ApiError } from '~/shared/models/ApiError';\nimport type { FetcherOptions } from '~/shared/types/FetcherOptions';\nimport { getSafeUrl } from '~/shared/utils/getSafeUrl';\n\nexport function useDeliveryAddress() {\n const { customerId, tenant, globalApiUrl } = useConfiguration();\n\n return useSWR(() => {\n if (!customerId) {\n return null;\n }\n\n const url = getSafeUrl(`/customers/${customerId}/addresses`, globalApiUrl);\n const options: FetcherOptions = {\n tenant,\n };\n\n return [url, options];\n });\n}\n","import type { ApiModels } from '@ori/global-api-client';\nimport useSWR from 'swr';\n\nimport { useConfiguration } from '~/shared/contexts/configurationContext';\nimport type { ApiError } from '~/shared/models/ApiError';\nimport type { FetcherOptions } from '~/shared/types/FetcherOptions';\nimport { getSafeUrl } from '~/shared/utils/getSafeUrl';\n\nexport function useAutoshipLegalArticles() {\n const { customerId, tenant, globalApiUrl } = useConfiguration();\n\n const url = getSafeUrl(`/customers/${customerId}/autoshipLegalArticles`, globalApiUrl);\n const options: FetcherOptions = {\n tenant,\n };\n\n return useSWR([url, options]);\n}\n","import { Dialog } from '@ori-ui/components';\nimport { styled, Typography, useMediaQuery, useTheme } from '@ori-ui/mui';\nimport useTestId from '@ori/testid-generator';\nimport { useContext, useMemo } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { Pages } from './pages';\nimport { localization } from '~/shared/constants';\nimport { stateContext, wizardContext } from '~/shared/contexts';\n\nconst ContentWrap = styled('div')(({ theme }) => ({\n minWidth: 200,\n [theme.breakpoints.up('md')]: {\n width: 400,\n },\n}));\n\nconst ModalHeader = styled(Typography)(({ theme }) => ({\n margin: 0,\n padding: 0,\n marginBottom: theme.spacing(3),\n}));\n\nconst steps = [1, 2, 3];\n\nexport function AutoshipWizard() {\n const { getTestIdProps } = useTestId();\n const { open, onClose } = useContext(wizardContext);\n const { isBackEnabled, stepBack, currentStep } = useContext(stateContext);\n const { breakpoints } = useTheme();\n const isMobile = useMediaQuery(breakpoints.only('xs'));\n\n const CurrentPage = useMemo(() => Pages[currentStep], [currentStep]);\n\n const headingKey = useMemo(() => {\n if (currentStep < steps.length) {\n return 'newSubscription';\n }\n\n return 'subscriptionReview';\n }, [currentStep]);\n\n return (\n \n \n \n }\n sx={{\n '& .MuiOriDialog-content': { ...(!isMobile && { overflow: 'initial' }) }, // disable default scroll on Dialog content\n '& .MuiOriDialogBase-dialogGrid': { ...(isMobile && { top: '60px' }) },\n }}\n showBackButton={isBackEnabled}\n open={open}\n onBack={stepBack}\n onClose={onClose}\n >\n {typeof CurrentPage === 'function' ? :
}\n \n );\n}\n","import { TypesProvider } from '../contexts';\nimport { useAutoshipTypes } from '../hooks/useAutoshipTypes';\nimport { StateContainer } from './StateContainer';\nimport { AutoshipWizard } from '~/AutoshipWizard';\n\nexport const AutoshipContainer = ({ product }: { product?: string }) => {\n const { data, error } = useAutoshipTypes(product);\n\n const isLoading = !data && !error;\n\n return (\n \n \n \n \n \n );\n};\n","import type { ApiModels } from '@ori/global-api-client';\nimport useSWR from 'swr';\n\nimport { useConfiguration } from '../contexts/configurationContext';\nimport type { ApiError } from '../models/ApiError';\nimport type { FetcherOptions } from '~/shared/types/FetcherOptions';\nimport { getSafeUrl } from '~/shared/utils/getSafeUrl';\n\nexport function useAutoshipTypes(product?: string) {\n const { customerId, tenant, globalApiUrl } = useConfiguration();\n\n return useSWR(() => {\n if (!customerId) {\n return null;\n }\n\n const url = getSafeUrl(`/customers/${customerId}/autoshipTypes`, globalApiUrl);\n const options: FetcherOptions = {\n tenant,\n params: {\n ...(product && { product: product.toString() }),\n },\n };\n\n return [url, options];\n });\n}\n"],"names":["CustomerSelectionForm","forwardRef","ref","onChange","getTestIdProps","useTestId","useContext","stateContext","selectedCustomerType","setCustomerType","handleChange","useCallback","value","currentTarget","Typography","variant","sx","marginBottom","fontWeight","id","defaultMessage","localization","selected","ECustomerTypeSelection","frequencies","Message","Value","FormGrid","styled","display","rowGap","theme","spacing","FrequencySelection","formatMessage","useIntl","setFrequency","selectedFrequency","selectFrequency","mapFrequencies","map","Id","Text","autoComplete","displayEmpty","placeholder","items","event","frequencyToSave","find","frequency","target","StyledCustomerSelection","marginTop","width","overflow","ReviewPrice","gridTemplateAreas","gridTemplateColumns","alignItems","columnGap","PriceReviewComponent","labelKey","price","action","gridArea","style","memo","StyledReviewSection","ReviewAction","ReviewSectionComponent","reviewAction","reviewContent","color","StyledTermsAndConditions","TermsAndConditionsComponent","children","checked","Checkbox","formatName","firstName","lastName","useCustomerReview","customerId","tenant","globalApiUrl","url","options","existingCustomer","newCustomer","data","useConfiguration","getSafeUrl","useSWR","surname","useRecurringPaymentCards","revalidateOnFocus","MasterCard","props","SvgIcon","transform","d","fillRule","x","y","height","fill","Other","Visa","Maestro","CardNumber","cardNumber","collection","cardNumberLast4","expiryMonth","expiryYear","PrivacyPolicy","Link","paddingLeft","cardIcons","fontSize","Pages","PackageSelection","isCustomerSelectionValid","goToSummary","Button","fullWidth","disabled","onClick","cardType","selectedPackage","termsAndConditionsAccepted","setTermsAndConditions","setCurrentStep","recurringPaymentCardsData","useDeliveryAddress","customerAddresses","useAutoshipLegalArticles","termsAndPrivacyData","content","wizardContext","onClose","onSave","onError","productCode","identityUrl","placement","uriTemplate","useState","isDisabled","setIsDisabled","customerIdToPost","endConsumerId","token","getToken","customerAddress","customerAddressesCollection","address","isPrimary","streetAddress","area","city","zipcode","country","undefined","postAutoship","async","autoshipInstructionsToPost","newConsumer","existingConsumerId","packageId","Number","status","autoshipInstructionsUrl","client","headers","authorization","toString","detail","type","EWizardType","subscriptionId","newAutoshipId","orderId","newOrderId","paymentProviderId","paymentId","error","RestError","code","response","message","String","body","moveToStep","stepNumber","firstRecurringPayment","description","IconButton","size","PenFilled","Tooltip","leaveTouchDelay","enterTouchDelay","enterDelay","title","disableFocusRipple","disableRipple","InfoCircle","totalPriceForTheFirstStep","href","termsAndConditions","privacyPolicy","ContentWrap","minWidth","breakpoints","up","ModalHeader","margin","padding","steps","AutoshipWizard","open","isBackEnabled","stepBack","currentStep","useTheme","isMobile","useMediaQuery","only","CurrentPage","useMemo","headingKey","length","Dialog","header","top","showBackButton","onBack","AutoshipContainer","product","params","useAutoshipTypes","isLoading","types","StateContainer"],"sourceRoot":""}