{"version":3,"file":"RouteCard.kPCRTYIS.mjs","names":[],"sources":["https:/framerusercontent.com/modules/QcKTXp4xeKJV1LnYcjmP/A7dFtOj5LDNvoVPeajeh/RouteCard.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import styled from\"styled-components\";import{t}from\"https://framerusercontent.com/modules/WhlIZZo0T4TN1IqF7CDS/k6lk92SuAjAL4FOalod4/Utils.js\";var DifficultyEnum;(function(DifficultyEnum){DifficultyEnum[DifficultyEnum[\"EASY\"]=1]=\"EASY\";DifficultyEnum[DifficultyEnum[\"SIMPLE\"]=2]=\"SIMPLE\";DifficultyEnum[DifficultyEnum[\"MODERATE\"]=3]=\"MODERATE\";DifficultyEnum[DifficultyEnum[\"DIFFICULT\"]=4]=\"DIFFICULT\";DifficultyEnum[DifficultyEnum[\"COMPLEX\"]=5]=\"COMPLEX\";})(DifficultyEnum||(DifficultyEnum={}));function getDifficultyLabel(difficultyValue){const labels={[1]:\"Easy\",[2]:\"Simple\",[3]:\"Moderate\",[4]:\"Difficult\",[5]:\"Complex\"};return labels[difficultyValue];}export const selectIconDifficulty=(difficulty,dark)=>{const colorBar=dark?\"#E6F0F5\":\"#EEF2F5\";const colorBarActive=dark?\"#8B99B5\":\"#fff\";switch(difficulty){case 1:return /*#__PURE__*/_jsxs(\"svg\",{width:\"27\",height:\"16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M3 9.5a1.5 1.5 0 1 0-3 0v5a1.5 1.5 0 0 0 3 0v-5Z\",fill:colorBarActive}),/*#__PURE__*/_jsx(\"path\",{opacity:\".5\",d:\"M9 7.5a1.5 1.5 0 1 0-3 0v7a1.5 1.5 0 0 0 3 0v-7ZM15 5.5a1.5 1.5 0 0 0-3 0v9a1.5 1.5 0 0 0 3 0v-9ZM21 3.5a1.5 1.5 0 0 0-3 0v11a1.5 1.5 0 0 0 3 0v-11ZM27 1.5a1.5 1.5 0 0 0-3 0v13a1.5 1.5 0 0 0 3 0v-13Z\",fill:colorBar})]});case 2:return /*#__PURE__*/_jsxs(\"svg\",{width:\"27\",height:\"16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M3 9.5a1.5 1.5 0 1 0-3 0v5a1.5 1.5 0 0 0 3 0v-5ZM9 7.5a1.5 1.5 0 1 0-3 0v7a1.5 1.5 0 0 0 3 0v-7Z\",fill:colorBarActive}),/*#__PURE__*/_jsx(\"path\",{opacity:\".5\",d:\"M15 5.5a1.5 1.5 0 0 0-3 0v9a1.5 1.5 0 0 0 3 0v-9ZM21 3.5a1.5 1.5 0 0 0-3 0v11a1.5 1.5 0 0 0 3 0v-11ZM27 1.5a1.5 1.5 0 0 0-3 0v13a1.5 1.5 0 0 0 3 0v-13Z\",fill:colorBar})]});case 3:return /*#__PURE__*/_jsxs(\"svg\",{width:\"27\",height:\"16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M3 9.5a1.5 1.5 0 1 0-3 0v5a1.5 1.5 0 0 0 3 0v-5ZM9 7.5a1.5 1.5 0 1 0-3 0v7a1.5 1.5 0 0 0 3 0v-7ZM15 5.5a1.5 1.5 0 0 0-3 0v9a1.5 1.5 0 0 0 3 0v-9Z\",fill:colorBarActive}),/*#__PURE__*/_jsx(\"path\",{opacity:\".5\",d:\"M21 3.5a1.5 1.5 0 0 0-3 0v11a1.5 1.5 0 0 0 3 0v-11ZM27 1.5a1.5 1.5 0 0 0-3 0v13a1.5 1.5 0 0 0 3 0v-13Z\",fill:colorBar})]});case 4:return /*#__PURE__*/_jsxs(\"svg\",{width:\"27\",height:\"16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M3 9.5a1.5 1.5 0 1 0-3 0v5a1.5 1.5 0 0 0 3 0v-5ZM9 7.5a1.5 1.5 0 1 0-3 0v7a1.5 1.5 0 0 0 3 0v-7ZM15 5.5a1.5 1.5 0 0 0-3 0v9a1.5 1.5 0 0 0 3 0v-9ZM21 3.5a1.5 1.5 0 0 0-3 0v11a1.5 1.5 0 0 0 3 0v-11Z\",fill:colorBarActive}),/*#__PURE__*/_jsx(\"path\",{opacity:\".5\",d:\"M27 1.5a1.5 1.5 0 0 0-3 0v13a1.5 1.5 0 0 0 3 0v-13Z\",fill:colorBar})]});case 5:return /*#__PURE__*/_jsx(\"svg\",{width:\"27\",height:\"16\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M3 9.5a1.5 1.5 0 1 0-3 0v5a1.5 1.5 0 0 0 3 0v-5ZM9 7.5a1.5 1.5 0 1 0-3 0v7a1.5 1.5 0 0 0 3 0v-7ZM15 5.5a1.5 1.5 0 0 0-3 0v9a1.5 1.5 0 0 0 3 0v-9ZM21 3.5a1.5 1.5 0 0 0-3 0v11a1.5 1.5 0 0 0 3 0v-11ZM27 1.5a1.5 1.5 0 0 0-3 0v13a1.5 1.5 0 0 0 3 0v-13Z\",fill:colorBarActive})});default:return null;}};const mock={id:\"saint-lucia-rei\",programId:\"saint-lucia-cbi-v1\",title:\"Invest in real estate\",icon:\"investment\",popular:false,subtitle:\"Invest a minimum of $200k in a government-approved real estate development. Currently, there are no available real estate developments.\",processingTime:\"8 months\",imageUrl:\"https://asset.citizenx.com/~/calculator-route/route/real-estate-investment\",difficulty:\"challenging\",costSummary:{totalCost:236232,processingCost:15120,investmentCost:2e5,contributionCost:0,platformCost:21112}};const formatCompactNumber=value=>{if(!value)return\"\";return new Intl.NumberFormat(\"en\",{}).format(parseInt(value));};/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function RouteCard(props){var _props_costSummary,_props_costSummary1;const handleClick=()=>{window.location.href=\"/start\";};return /*#__PURE__*/_jsxs(\"div\",{style:{...containerStyle,background:`url(\"${props===null||props===void 0?void 0:props.imageUrl}\")`,backgroundSize:\"cover\",backgroundPosition:\"center\",...props.isSelected?containerSelected:{},...props.disable?containerDisabled:{}},children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"p\",{style:headerStyle,children:props===null||props===void 0?void 0:props.title}),/*#__PURE__*/_jsx(\"p\",{style:subheaderStyle,children:props===null||props===void 0?void 0:props.subtitle}),props.disable?/*#__PURE__*/_jsx(NotAvailableLabel,{style:notAvailableStyle,children:t(\"routeCard.comingSoon\")}):null]}),!props.disable?/*#__PURE__*/_jsxs(RouteDataRow,{style:propColumnStyle,children:[(props===null||props===void 0?void 0:(_props_costSummary=props.costSummary)===null||_props_costSummary===void 0?void 0:_props_costSummary.totalCost)?/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"p\",{style:propHeaderStyle,children:t(\"routeCard.totalCost\")}),/*#__PURE__*/_jsxs(\"p\",{style:propValueStyle,children:[\"$\",formatCompactNumber(props===null||props===void 0?void 0:(_props_costSummary1=props.costSummary)===null||_props_costSummary1===void 0?void 0:_props_costSummary1.totalCost)]})]}):null,(props===null||props===void 0?void 0:props.processingTime)?/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"p\",{style:propHeaderStyle,children:t(\"routeCard.processingTime\")}),/*#__PURE__*/_jsx(\"p\",{style:propValueStyle,children:props===null||props===void 0?void 0:props.processingTime})]}):null,/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"p\",{style:propHeaderStyle,children:t(\"routeCard.difficulty\")}),/*#__PURE__*/_jsxs(\"div\",{style:propValueStyle,children:[selectIconDifficulty(props===null||props===void 0?void 0:props.difficulty),getDifficultyLabel(props===null||props===void 0?void 0:props.difficulty)]})]})]}):/*#__PURE__*/_jsxs(\"div\",{style:notifyMeStyle,onClick:handleClick,children:[/*#__PURE__*/_jsxs(\"p\",{style:notifyMeTextStyle,children:[t(\"routeCard.notifyWhenAvailable\"),\" \"]}),/*#__PURE__*/_jsx(\"svg\",{width:\"11\",height:\"11\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:/*#__PURE__*/_jsx(\"path\",{d:\"M1.468 10.889.115 9.535 6.89 2.768H1.749L1.767.904h8.314v8.332H8.227V4.121L1.468 10.89Z\",fill:\"#fff\"})})]})]});}// Styles are written in object syntax\n// Learn more: https://reactjs.org/docs/dom-elements.html#style\nconst containerStyle={height:\"auto\",cursor:\"pointer\",padding:\"24px\",display:\"flex\",flexDirection:\"column\",justifyContent:\"space-between\",overflow:\"hidden\",minHeight:\"275px\",boxShadow:\"0px 6px 4px 0px #08122629\",borderRadius:\"8px\",width:\"100%\",position:\"relative\"};const notifyMeStyle={display:\"flex\",flexDirection:\"row\",margin:0,justifyCotent:\"center\",alignItems:\"center\",gap:\"8px\",fontFamily:\"Inter Tight\",fontWeight:600,fontSize:\"18px\",lineHeight:\"26px\",cursor:\"pointer\",color:\"white\"};const notifyMeTextStyle={margin:0};const notAvailableStyle={padding:\"5px 9px\",color:\"white\",background:\"rgba(255, 255, 255, 0.11)\",width:\"max-content\",fontFamily:\"Inter Tight\",fontSize:\"16px\",lineHeight:\"21px\",borderRadius:\"7.3px\",fontWeight:400,opacity:\"1\",marginBottom:\"16px\",border:\"1px solid rgba(255, 255, 255, 0.24)\"};const containerSelected={boxShadow:\"none\"};const containerDisabled={boxShadow:\"none\",cursor:\"default\",filter:\"grayscale(1)\"};const headerStyle={fontFamily:\"Inter Tight\",color:\"white\",fontSize:\"22px\",fontWeight:700,lineHeight:\"32px\",letterSpacing:\"0.01em\",textAlign:\"left\",margin:0,maxWidth:\"558px\",marginBottom:\"8px\"};const subheaderStyle={fontFamily:\"Inter Tight\",color:\"rgba(255, 255, 255, 0.82)\",fontSize:\"18px\",fontWeight:400,lineHeight:\"24px\",letterSpacing:\"0.01em\",textAlign:\"left\",margin:0,marginBottom:\"16px\",maxWidth:\"558px\"};const propHeaderStyle={fontFamily:\"Inter\",color:\"rgba(255, 255, 255, 0.8)\",fontSize:\"16px\",fontWeight:600,lineHeight:\"26px\",letterSpacing:\"-0.04em\",textAlign:\"left\",margin:0};const propValueStyle={fontFamily:\"Inter\",color:\"white\",fontSize:\"18px\",fontWeight:600,lineHeight:\"26px\",letterSpacing:\"-0.04em\",textAlign:\"left\",margin:0,display:\"flex\",flexDirection:\"row\",alignItems:\"center\",gap:\"8px\",textTransform:\"capitalize\"};const propColumnStyle={display:\"flex\",flexDirection:\"row\",gap:\"36px\"};const RouteDataRow=styled.div`\n  display: flex;\n  flex-direction: row;\n  @media (max-width: 500px) {\n    flex-direction: column !important;\n    gap: 16px !important;\n  }\n`;const NotAvailableLabel=styled.div`\n  @media (min-width: 500px) {\n    position: absolute !important;\n    top: 16px !important;\n    right: 16px !important;\n  }\n`;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RouteCard\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"selectIconDifficulty\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"wLAEwiB,SAAS,EAAmB,EAAgB,CAAqF,MAAvE,CAAE,EAAG,OAAQ,EAAG,SAAU,EAAG,WAAY,EAAG,YAAa,EAAG,UAAU,CAAe,GAMprB,SAAwB,EAAU,EAAM,CAA4C,IAAM,MAAgB,CAAC,EAAO,SAAS,KAAK,UAAW,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,GAAG,EAAe,WAAW,QAAQ,GAA0C,SAAS,IAAI,eAAe,QAAQ,mBAAmB,SAAS,GAAG,EAAM,WAAW,EAAkB,EAAE,CAAC,GAAG,EAAM,QAAQ,EAAkB,EAAE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