{"version":3,"sources":["webpack:///./src/components/InfoBlock/InfoBlock.tsx","webpack:///./src/pages/customer-centre/resources/index.tsx","webpack:///./src/components/ButtonLink/ButtonLink.tsx"],"names":["InfoBlock","heading","icon","buttonOptions","children","className","type","label","memo","withTranslation","LocaleNameSpaceKeys","CUSTOMER_CENTRE","props","t","layoutOptions","seo","title","page","heroSection","options","accentColor","HeroSectionColors","SKY_BLUE","heroImage","fileName","alt","infoBlocks","to","getPathFromRouteKey","RouteKeys","BORROWER","key","IconTypes","CLIENT_PORTAL","PREPAYMENT_CALCULATOR","MORTGAGE_SERVICE_DOCUMENTS","MORTGAGE_SERVICING_DOCS","RESOURCES","FINANCIAL_LITERACY","FINANCIAL_TOOLS_RESOURCES","map","infoBlock","iconOptions","ARROW_NEXT","styleOptions","isInline","size","ButtonLinkSize","LARGE","ariaLabel","Array","length","item","index","aria-hidden","ButtonLinkType","defaultLinkOptions","isExternalLink","shouldOpenInNewTab","shouldEnableActiveState","defaultStyleOptions","PRIMARY","invertColors","ButtonLink","linkOptions","aLinkProps","styleOptionsWithDefault","linkOptionsWithDefault","classNames","classnames","small","SMALL","aLinkPropsDefault","href","target","rel","linkProps","partiallyActive","activeClassName","undefined","getIcon","IconComp","className_","position","React","Fragment","role"],"mappings":"uHAAA,2DA0BA,MAAMA,EAA8B,IAMvB,IANuB,QAClCC,EADkC,KAElCC,EAFkC,cAGlCC,EAHkC,SAIlCC,EAJkC,UAKlCC,EAAY,IACD,EASX,OACE,yBAAKA,UAAY,aAAYA,GAP3B,yBAAKA,UAAU,sBACZH,GAAQ,kBAAC,IAAD,CAAMI,KAAMJ,IACD,iBAAZD,EAAuB,4BAAKA,GAAgBA,GAOtD,6BAAMG,GACLD,GAAiB,kBAAC,IAAeA,EAAgBA,EAAcI,SAKvDC,mBAAKR,I,wLC4DLS,sBAAgBC,IAAoBC,gBAApCF,CA7FqBG,IAClC,MAAM,EAAEC,GAAMD,EAERE,EAA+B,CACnCC,IAAK,CACHC,MAAOH,EA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wBH,KAGxC,kBAAC,IAAD,eAAM3E,UAAW+D,GAAgBQ,EAAgB3B,EAAY,CAAE,aAAcA,GAAc,OACtFP,aAAD,EAACA,EAAayC,WAAsC,UAA1BzC,aAAA,EAAAA,EAAayC,YAAwBH,IAChE5E,EAC0B,WAA1BsC,aAAA,EAAAA,EAAayC,WAAwBH,MAK7BxE,mBAAKuD,I","file":"component---src-pages-customer-centre-resources-index-tsx-62b3240c8fe09b5efabe.js","sourcesContent":["import React, { memo } from 'react';\nimport Icon, { IconTypes } from '../Icon/Icon';\nimport ButtonLink, {\n ButtonLinkLinkOptions,\n ButtonLinkStyleOptions,\n ButtonLinkIconOptions,\n} from '../ButtonLink/ButtonLink';\nimport './style.scss';\n\nexport interface OwnProps {\n className?: string;\n heading: string | React.ReactNode;\n children?: React.ReactNode;\n buttonOptions?: {\n to: string;\n label: string;\n iconOptions?: ButtonLinkIconOptions;\n linkOptions?: ButtonLinkLinkOptions;\n styleOptions?: ButtonLinkStyleOptions;\n ariaLabel?: string;\n };\n icon?: IconTypes;\n}\n\ntype Props = OwnProps;\n\nconst InfoBlock: React.FC = ({\n heading,\n icon,\n buttonOptions,\n children,\n className = '',\n}: Props) => {\n const getTitle = () => {\n return (\n
\n {icon && }\n {typeof heading === 'string' ?
{heading}
: heading}\n
\n );\n };\n return (\n
\n {getTitle()}\n
{children}
\n {buttonOptions && {buttonOptions.label}}\n
\n );\n};\n\nexport default memo(InfoBlock);\n","import React from 'react';\nimport { PageProps } from 'gatsby';\nimport { WithTranslation, withTranslation } from 'react-i18next';\n\nimport Layout, { HeroSectionColors, LayoutOptions } from '../../../components/Layout/Layout';\n\nimport { IconTypes } from '../../../components/Icon/Icon';\nimport InfoBlock from '../../../components/InfoBlock/InfoBlock';\nimport { ButtonLinkSize } from '../../../components/ButtonLink/ButtonLink';\nimport { LocaleNameSpaceKeys } from '../../../localization/translations';\nimport { getPathFromRouteKey } from '../../../shared/utils/getPathFromRouteKey';\nimport RouteKeys from '../../../../config/RouteKeys';\n\nimport './style.scss';\n\ntype Props = PageProps & WithTranslation;\n\nconst Resources: React.FC = (props) => {\n const { t } = props;\n\n const layoutOptions: LayoutOptions = {\n seo: {\n title: t('resources.seo.title'),\n },\n page: {\n title: t('resources.heading'),\n },\n heroSection: {\n options: {\n accentColor: HeroSectionColors.SKY_BLUE,\n heroImage: {\n fileName: 'hero-image-13.jpg',\n alt: 'Image',\n },\n },\n },\n };\n\n const infoBlocks = [\n {\n to: getPathFromRouteKey(RouteKeys.BORROWER),\n key: 'clientPortal',\n icon: IconTypes.CLIENT_PORTAL,\n },\n {\n to: getPathFromRouteKey(RouteKeys.CUSTOMER_CENTRE.PREPAYMENT_CALCULATOR),\n key: 'prepaymentCalculator',\n icon: IconTypes.PREPAYMENT_CALCULATOR,\n },\n {\n to: getPathFromRouteKey(RouteKeys.CUSTOMER_CENTRE.MORTGAGE_SERVICE_DOCUMENTS),\n key: 'mortgageServicingDocuments',\n icon: IconTypes.MORTGAGE_SERVICING_DOCS,\n },\n {\n to: getPathFromRouteKey(RouteKeys.CUSTOMER_CENTRE.RESOURCES.FINANCIAL_LITERACY),\n key: 'financialLiteracy',\n icon: IconTypes.FINANCIAL_LITERACY,\n },\n {\n to: getPathFromRouteKey(RouteKeys.CUSTOMER_CENTRE.RESOURCES.FINANCIAL_TOOLS_RESOURCES),\n key: 'financialTools',\n icon: IconTypes.FINANCIAL_TOOLS_RESOURCES,\n },\n // {\n // to: getPathFromRouteKey(RouteKeys.CUSTOMER_CENTRE.COVID19_FAQ),\n // key: 'covid19Support',\n // icon: IconTypes.COVID19_SUPPORT,\n // },\n ];\n\n return (\n \n
\n
\n {infoBlocks.map((infoBlock) => (\n
\n {t(`resources.${infoBlock.key}.heading`)}}\n >\n

{t(`resources.${infoBlock.key}.body`)}

\n \n
\n ))}\n {[...Array(3 - (infoBlocks.length % 3))].map((item, index) => (\n \n ))}\n
\n
\n
\n );\n};\n\nexport default withTranslation(LocaleNameSpaceKeys.CUSTOMER_CENTRE)(Resources);\n","import React, { memo } from 'react';\nimport classnames from 'classnames';\nimport './style.scss';\nimport Icon, { IconTypes } from '../Icon/Icon';\nimport Link from '../Link/Link';\n\nexport enum ButtonLinkType {\n PRIMARY = 'ButtonLink__primary',\n // SECONDARY = 'ButtonLink_secondary'\n}\n\nexport enum ButtonLinkSize {\n SMALL = 'ButtonLink__small',\n LARGE = 'ButtonLink__large',\n // SECONDARY = 'SECONDARY'\n}\nexport interface ButtonLinkLinkOptions {\n isExternalLink?: boolean;\n shouldOpenInNewTab?: boolean; // This option will be overridden if the external link is true\n shouldEnableActiveState?: boolean; // Only gets affected if isExternalLink is false\n}\n\nexport interface ButtonLinkStyleOptions {\n isInline?: boolean;\n type?: ButtonLinkType;\n size?: ButtonLinkSize;\n invertColors?: boolean;\n}\n\nexport interface ButtonLinkIconOptions {\n icon: IconTypes;\n position?: 'left' | 'right'; // default is always left\n}\n\ninterface AnchorLinkProps {\n href?: string;\n target?: string;\n rel?: string;\n}\n\nexport interface OwnProps {\n to: string;\n linkOptions?: ButtonLinkLinkOptions;\n iconOptions?: ButtonLinkIconOptions;\n children?: React.ReactNode;\n className?: string;\n styleOptions?: ButtonLinkStyleOptions;\n aLinkProps?: AnchorLinkProps;\n ariaLabel?: string;\n}\n\ntype Props = OwnProps;\n\nconst defaultLinkOptions: ButtonLinkLinkOptions = {\n isExternalLink: false,\n shouldOpenInNewTab: false, // This option will be overridden if the external link is true\n shouldEnableActiveState: true, // Only gets affected if isExternalLink is false\n};\n\nconst defaultStyleOptions: ButtonLinkStyleOptions = {\n isInline: false,\n type: ButtonLinkType.PRIMARY,\n size: ButtonLinkSize.LARGE,\n invertColors: false,\n};\n\nconst ButtonLink: React.FC = ({\n to,\n linkOptions,\n iconOptions,\n styleOptions,\n className = '',\n // onClick = () => {},\n aLinkProps,\n children = null,\n ariaLabel,\n}: Props) => {\n const styleOptionsWithDefault: ButtonLinkStyleOptions = {\n ...defaultStyleOptions,\n ...styleOptions,\n };\n\n const linkOptionsWithDefault: ButtonLinkLinkOptions = {\n ...defaultLinkOptions,\n ...linkOptions,\n };\n\n const classNames = classnames(\n `ButtonLink`,\n styleOptionsWithDefault.type,\n styleOptionsWithDefault.size,\n className,\n {\n 'ButtonLink__inline-link': !!styleOptions?.isInline,\n 'ButtonLink__invert-colors': !!styleOptions?.invertColors,\n small: styleOptionsWithDefault.size === ButtonLinkSize.SMALL,\n }\n );\n\n const aLinkPropsDefault = {\n href: to,\n target: '__blank',\n rel: 'noopener',\n ...aLinkProps,\n };\n\n const linkProps = {\n to,\n partiallyActive: !!linkOptionsWithDefault.shouldEnableActiveState,\n activeClassName: linkOptionsWithDefault?.shouldEnableActiveState\n ? 'ButtonLink--active'\n : undefined,\n };\n\n const getIcon = () => {\n if (iconOptions) {\n const IconComp = ({ className_ }: any) => (\n \n \n \n );\n return (\n \n );\n }\n return React.Fragment;\n };\n\n return linkOptionsWithDefault.isExternalLink ? (\n \n {(!iconOptions?.position || iconOptions?.position === 'left') && getIcon()}\n {children}\n {iconOptions?.position === 'right' && getIcon()}\n \n ) : (\n \n {(!iconOptions?.position || iconOptions?.position === 'left') && getIcon()}\n {children}\n {iconOptions?.position === 'right' && getIcon()}\n \n );\n};\n\nexport default memo(ButtonLink);\n"],"sourceRoot":""}