{"version":3,"file":"LocaleVariantTrigger.B_BoFPla.mjs","names":["useRef"],"sources":["https:/framerusercontent.com/modules/B7A37jhuChNgnLvArABr/HgU7Fj2M7n5ZhvbtzdDr/LocaleVariantTrigger.js"],"sourcesContent":["// Requested: Create a new Framer code component named \"LocaleVariantTrigger\" that renders as an invisible zero-footprint helper and fires an EventHandler once on mount when the active locale is Brazil/Portuguese (pt), using useLocaleInfo() with id/name/code.\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";function isBrazilLocale(activeLocale){if(!activeLocale)return false;const normalizeBase=value=>{if(!value)return\"\";return value.trim().toLowerCase().split(/[-_]/)[0]||\"\";};const codeBase=normalizeBase(activeLocale.code);const idBase=normalizeBase(activeLocale.id);return codeBase===\"pt\"||idBase===\"pt\";}/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function LocaleVariantTrigger(props){const{onBrazilDetected}=props;const{activeLocale}=useLocaleInfo();const hasTriggeredRef=useRef(false);useEffect(()=>{if(hasTriggeredRef.current)return;if(typeof onBrazilDetected!==\"function\")return;if(isBrazilLocale(activeLocale)){hasTriggeredRef.current=true;onBrazilDetected();}},[]);return /*#__PURE__*/_jsx(\"div\",{style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",pointerEvents:\"none\"}});}addPropertyControls(LocaleVariantTrigger,{onBrazilDetected:{type:ControlType.EventHandler,title:\"On Brazil Detected\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LocaleVariantTrigger\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LocaleVariantTrigger.map"],"mappings":"0LACiJ,SAAS,EAAe,EAAa,CAAC,GAAG,CAAC,EAAa,MAAO,GAAM,IAAM,EAAc,GAAY,GAAsB,EAAM,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,IAAnD,GAAkE,EAAS,EAAc,EAAa,IAAI,EAAQ,EAAO,EAAc,EAAa,EAAE,EAAE,OAAO,IAAW,MAAM,IAAS,IAAK,CAG5b,SAAwB,EAAqB,EAAM,CAAC,GAAK,CAAC,oBAAkB,EAAW,CAAC,gBAAc,EAAc,EAAQ,EAAgBA,EAAO,EAAK,EAA0L,OAAxL,MAAc,CAAI,EAAgB,SAAkB,OAAO,GAAmB,YAAqB,EAAe,CAAY,IAAG,EAAgB,QAAQ,GAAK,EAAiB,EAAG,EAAE,CAAC,CAAC,EAAsB,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,OAAO,EAAE,SAAS,SAAS,cAAc,MAAM,CAAC,CAAC,CAAE,iBAHja,IAAoC,IAAkE,EAG4T,EAAoB,EAAqB,CAAC,iBAAiB,CAAC,KAAK,EAAY,aAAa,MAAM,oBAAoB,CAAC,CAAC"}