{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/OlzdIjhHMjH399z0GHHo/7GxqOBMrKiQPGXAWAoyJ/DynamicLocationHeader.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";// --- Configuration ---\n// Edit these values if needed\n// The URL parameter key you'll use (e.g., yoursite.com?loc=1015164)\n// Make sure this matches what you set in Google Ads Final URL Suffix\nconst URL_PARAM_KEY=\"loc\";// Your default city name if no parameter is found or matched\nconst DEFAULT_CITY=\"Broward County\"// <-- CHANGE THIS if you want a different default\n;// Map Google's numerical Location IDs (Criteria IDs) to display names\n// Keys MUST be strings containing the numerical IDs passed by {loc_physical_ms}\nconst LOCATION_MAPPING={// Google Ads Location IDs for Broward County Cities (Verify if possible)\n\"1015164\":\"Fort Lauderdale\",\"1015094\":\"Pembroke Pines\",\"1015117\":\"Hollywood\",\"1015082\":\"Miramar\",\"1015147\":\"Coral Springs\",\"1015100\":\"Pompano Beach\",\"1015150\":\"Davie\",\"1015098\":\"Plantation\",\"1015121\":\"Sunrise\",\"1015152\":\"Deerfield Beach\",\"1015074\":\"Lauderhill\",\"1014986\":\"Weston\",\"1015123\":\"Tamarac\",\"1015079\":\"Margate\",\"1015145\":\"Coconut Creek\",\"1015091\":\"Oakland Park\",\"1015088\":\"North Lauderdale\",\"1015170\":\"Hallandale Beach\",\"1015073\":\"Lauderdale Lakes\",\"1015151\":\"Dania Beach\",\"1015146\":\"Cooper City\",\"1015093\":\"Parkland\",\"1015134\":\"Wilton Manors\",\"1015076\":\"Lighthouse Point\",\"1015175\":\"Hillsboro Beach\",\"1015095\":\"Pembroke Park\",\"9062651\":\"Southwest Ranches\",\"1015112\":\"Sea Ranch Lakes\"};// --- End Configuration ---\nexport default function DynamicLocationHeader(props){const{textBefore,textAfter,defaultCityOverride,style}=props;// Use the override from Framer props first, then the code default\nconst effectiveDefaultCity=defaultCityOverride||DEFAULT_CITY;const[cityName,setCityName]=useState(effectiveDefaultCity);useEffect(()=>{// This code runs only in the browser after the component mounts\nif(typeof window!==\"undefined\"){const params=new URLSearchParams(window.location.search);// Get the 'loc' parameter value (which should be a numerical ID string)\nconst locationId=params.get(URL_PARAM_KEY)// No need for lowercase/space removal for numerical IDs\n;if(locationId&&LOCATION_MAPPING[locationId]){// If we found a valid ID in the URL and it exists in our map\nsetCityName(LOCATION_MAPPING[locationId]);}else{// Otherwise, use the default (already set via initial state)\nsetCityName(effectiveDefaultCity);}}},[effectiveDefaultCity])// Re-run if the defaultCityOverride prop changes\n;// Combine default styles with any styles passed via props (Framer UI)\n// Note: Styles applied directly in Framer's UI will override these defaults.\nconst combinedStyle={...DynamicLocationHeader.defaultProps.style,...style};return(// Apply the combined styles to the H1 element\n/*#__PURE__*/_jsxs(\"h1\",{style:combinedStyle,children:[textBefore,\" \",/*#__PURE__*/_jsx(\"span\",{className:\"dynamic-location\",children:cityName}),textAfter]}));}// --- Framer Property Controls ---\n// Allows you to customize text and default city directly in the Framer UI\naddPropertyControls(DynamicLocationHeader,{textBefore:{type:ControlType.String,title:\"Text Before\",defaultValue:\"Welcome to\"},textAfter:{type:ControlType.String,title:\"Text After\",defaultValue:\"!\"},defaultCityOverride:{type:ControlType.String,title:\"Default City (Optional)\",description:`Overrides the default: \"${DEFAULT_CITY}\"`,defaultValue:\"\"}});// --- Default Styling (Updated to reduce vertical space) ---\n// These styles will be applied by default.\n// You can override them using Framer's style controls in the UI.\nDynamicLocationHeader.defaultProps={style:{fontFamily:'\"Roboto\", sans-serif',fontWeight:900,color:\"#000000\",fontSize:\"60px\",letterSpacing:\"0em\",lineHeight:\"1.1\",textAlign:\"left\",textTransform:\"capitalize\",width:\"100%\",margin:0,padding:0},// Default values for props controlled by addPropertyControls\ntextBefore:\"Welcome to\",textAfter:\"!\",defaultCityOverride:\"\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"DynamicLocationHeader\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./DynamicLocationHeader.map"],
  "mappings": "uJAIA,IAAMA,EAAc,MACdC,EAAa,iBAGbC,EAAiB,CACvB,QAAU,kBAAkB,QAAU,iBAAiB,QAAU,YAAY,QAAU,UAAU,QAAU,gBAAgB,QAAU,gBAAgB,QAAU,QAAQ,QAAU,aAAa,QAAU,UAAU,QAAU,kBAAkB,QAAU,aAAa,QAAU,SAAS,QAAU,UAAU,QAAU,UAAU,QAAU,gBAAgB,QAAU,eAAe,QAAU,mBAAmB,QAAU,mBAAmB,QAAU,mBAAmB,QAAU,cAAc,QAAU,cAAc,QAAU,WAAW,QAAU,gBAAgB,QAAU,mBAAmB,QAAU,kBAAkB,QAAU,gBAAgB,QAAU,oBAAoB,QAAU,iBAAiB,EACtqB,SAARC,EAAuCC,EAAM,CAAC,GAAK,CAAC,WAAAC,EAAW,UAAAC,EAAU,oBAAAC,EAAoB,MAAAC,CAAK,EAAEJ,EACrGK,EAAqBF,GAAqBN,EAAkB,CAACS,EAASC,CAAW,EAAEC,EAASH,CAAoB,EAAEI,EAAU,IAAI,CACtI,GAAG,OAAOC,EAAS,IAAY,CAC/B,IAAMC,EADuC,IAAI,gBAAgBD,EAAO,SAAS,MAAM,EAC/D,IAAId,CAAa,EACrCe,GAAYb,EAAiBa,CAAU,EAC3CJ,EAAYT,EAAiBa,CAAU,CAAC,EACxCJ,EAAYF,CAAoB,CAAG,CAAC,EAAE,CAACA,CAAoB,CAAC,EAG5D,IAAMO,EAAc,CAAC,GAAGb,EAAsB,aAAa,MAAM,GAAGK,CAAK,EAAE,OAC9DS,EAAM,KAAK,CAAC,MAAMD,EAAc,SAAS,CAACX,EAAW,IAAiBa,EAAK,OAAO,CAAC,UAAU,mBAAmB,SAASR,CAAQ,CAAC,EAAEJ,CAAS,CAAC,CAAC,CAAG,CAE/Ja,EAAoBhB,EAAsB,CAAC,WAAW,CAAC,KAAKiB,EAAY,OAAO,MAAM,cAAc,aAAa,YAAY,EAAE,UAAU,CAAC,KAAKA,EAAY,OAAO,MAAM,aAAa,aAAa,GAAG,EAAE,oBAAoB,CAAC,KAAKA,EAAY,OAAO,MAAM,0BAA0B,YAAY,2BAA2BnB,CAAY,IAAI,aAAa,EAAE,CAAC,CAAC,EAG3VE,EAAsB,aAAa,CAAC,MAAM,CAAC,WAAW,uBAAuB,WAAW,IAAI,MAAM,UAAU,SAAS,OAAO,cAAc,MAAM,WAAW,MAAM,UAAU,OAAO,cAAc,aAAa,MAAM,OAAO,OAAO,EAAE,QAAQ,CAAC,EAC5O,WAAW,aAAa,UAAU,IAAI,oBAAoB,EAAE",
  "names": ["URL_PARAM_KEY", "DEFAULT_CITY", "LOCATION_MAPPING", "DynamicLocationHeader", "props", "textBefore", "textAfter", "defaultCityOverride", "style", "effectiveDefaultCity", "cityName", "setCityName", "ye", "ue", "window", "locationId", "combinedStyle", "u", "p", "addPropertyControls", "ControlType"]
}
