{"version":3,"file":"LocationSelector.DekYu6sp.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/GqA3lwl0NrZgrPUWQDda/u6MZaCJk9gL5ad40rdSs/LocationSelector.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";// A limited set of countries with example cities\nconst locationOptions={Portugal:[\"Lisbon\",\"Porto\",\"Faro\",\"Coimbra\",\"Other\"],\"United Kingdom\":[\"London\",\"Manchester\",\"Bristol\",\"Glasgow\",\"Other\"],Ireland:[\"Dublin\",\"Cork\",\"Galway\",\"Limerick\",\"Other\"],Spain:[\"Barcelona\",\"Madrid\",\"Valencia\",\"Seville\",\"Other\"],France:[\"Paris\",\"Lyon\",\"Marseille\",\"Nice\",\"Other\"],Germany:[\"Berlin\",\"Munich\",\"Hamburg\",\"Cologne\",\"Other\"],Italy:[\"Rome\",\"Milan\",\"Florence\",\"Naples\",\"Other\"],Netherlands:[\"Amsterdam\",\"Rotterdam\",\"The Hague\",\"Utrecht\",\"Other\"],\"United States\":[\"New York\",\"Los Angeles\",\"Chicago\",\"Austin\",\"Other\"],Canada:[\"Toronto\",\"Vancouver\",\"Montreal\",\"Calgary\",\"Other\"],Australia:[\"Sydney\",\"Melbourne\",\"Brisbane\",\"Perth\",\"Other\"],\"South Africa\":[\"Cape Town\",\"Johannesburg\",\"Durban\",\"Pretoria\",\"Other\"],Other:[]};export function LocationSelector(){const[selectedCountry,setSelectedCountry]=React.useState(\"\");const[selectedCity,setSelectedCity]=React.useState(\"\");const[customCountry,setCustomCountry]=React.useState(\"\");const[customCity,setCustomCity]=React.useState(\"\");const showCustomCountry=selectedCountry===\"Other\";const showCustomCity=selectedCity===\"Other\"||selectedCountry===\"Other\"&&!selectedCity;const sharedSelectStyles={height:40,borderRadius:17,backgroundColor:\"#f7f7f7\",border:\"none\",padding:\"0 16px\",fontSize:14,fontFamily:\"Lexend, sans-serif\",color:\"#111\",appearance:\"none\",outline:\"none\",width:\"100%\"};return /*#__PURE__*/_jsxs(\"div\",{style:{fontFamily:\"Lexend, sans-serif\",fontSize:14,color:\"#111\",display:\"flex\",flexDirection:\"column\",gap:7},children:[/*#__PURE__*/_jsxs(\"div\",{style:{fontWeight:500,fontSize:\"14px\",color:\"#f0f0f0\",WebkitTextSizeAdjust:\"100%\"},children:[/*#__PURE__*/_jsx(\"span\",{style:{color:\"#FF0000\"},children:\"*\"}),\" Where is the organisation based?\"]}),/*#__PURE__*/_jsxs(\"select\",{name:\"country\",value:selectedCountry,onChange:e=>{setSelectedCountry(e.target.value);setSelectedCity(\"\");setCustomCountry(\"\");setCustomCity(\"\");},style:{...sharedSelectStyles,color:selectedCountry?\"#111\":\"#999999\"},children:[/*#__PURE__*/_jsx(\"option\",{value:\"\",disabled:true,children:\"Select your country\"}),Object.keys(locationOptions).map(country=>/*#__PURE__*/_jsx(\"option\",{value:country,children:country},country))]}),showCustomCountry&&/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"custom_country\",placeholder:\"Enter your country\",value:customCountry,onChange:e=>setCustomCountry(e.target.value),style:{...sharedSelectStyles,color:\"#111\",backgroundColor:\"#fff\"}}),selectedCountry&&locationOptions[selectedCountry]?.length>0&&/*#__PURE__*/_jsxs(\"select\",{name:\"city\",value:selectedCity,onChange:e=>setSelectedCity(e.target.value),style:{...sharedSelectStyles,color:selectedCity?\"#111\":\"#999999\"},children:[/*#__PURE__*/_jsx(\"option\",{value:\"\",disabled:true,children:\"Select your city\"}),locationOptions[selectedCountry].map(city=>/*#__PURE__*/_jsx(\"option\",{value:city,children:city},city))]}),showCustomCity&&/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"custom_city\",placeholder:\"Enter your city\",value:customCity,onChange:e=>setCustomCity(e.target.value),style:{...sharedSelectStyles,color:\"#111\",backgroundColor:\"#fff\"}}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"final_country\",value:selectedCountry===\"Other\"?customCountry:selectedCountry}),/*#__PURE__*/_jsx(\"input\",{type:\"hidden\",name:\"final_city\",value:selectedCity===\"Other\"||selectedCountry===\"Other\"?customCity:selectedCity})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"LocationSelector\":{\"type\":\"reactComponent\",\"name\":\"LocationSelector\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LocationSelector.map"],"mappings":"yHACmvB,SAAgB,GAAkB,CAAC,GAAK,CAAC,EAAgB,GAAoBA,EAAe,GAAG,CAAM,CAAC,EAAa,GAAiBA,EAAe,GAAG,CAAM,CAAC,EAAc,GAAkBA,EAAe,GAAG,CAAM,CAAC,EAAW,GAAeA,EAAe,GAAG,CAAO,EAAkB,IAAkB,QAAc,EAAe,IAAe,SAAS,IAAkB,SAAS,CAAC,EAAmB,EAAmB,CAAC,OAAO,GAAG,aAAa,GAAG,gBAAgB,UAAU,OAAO,OAAO,QAAQ,SAAS,SAAS,GAAG,WAAW,qBAAqB,MAAM,OAAO,WAAW,OAAO,QAAQ,OAAO,MAAM,OAAO,CAAC,OAAoB,EAAM,MAAM,CAAC,MAAM,CAAC,WAAW,qBAAqB,SAAS,GAAG,MAAM,OAAO,QAAQ,OAAO,cAAc,SAAS,IAAI,EAAE,CAAC,SAAS,CAAc,EAAM,MAAM,CAAC,MAAM,CAAC,WAAW,IAAI,SAAS,OAAO,MAAM,UAAU,qBAAqB,OAAO,CAAC,SAAS,CAAc,EAAK,OAAO,CAAC,MAAM,CAAC,MAAM,UAAU,CAAC,SAAS,IAAI,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAc,EAAM,SAAS,CAAC,KAAK,UAAU,MAAM,EAAgB,SAAS,GAAG,CAAC,EAAmB,EAAE,OAAO,MAAM,CAAC,EAAgB,GAAG,CAAC,EAAiB,GAAG,CAAC,EAAc,GAAG,EAAG,MAAM,CAAC,GAAG,EAAmB,MAAM,EAAgB,OAAO,UAAU,CAAC,SAAS,CAAc,EAA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