{"version":3,"file":"LocaleVariantTrigger.FyVCbC_Y.mjs","names":["useRef","useEffect","_jsx","__esmMin","init_npm_react_18_3_1","de","init_jsx_runtime","c","ce","useLocaleInfo","init_framer_BWzg2IRg","addPropertyControls","ControlType","isBrazilLocale","activeLocale","normalizeBase","value","codeBase","idBase","LocaleVariantTrigger","props","onBrazilDetected","hasTriggeredRef","init_LocaleVariantTrigger"],"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":"A,yLACiJ,SAASa,EAAeC,EAAa,CAAC,GAAG,CAACA,EAAa,MAAO,GAAM,IAAMC,EAAcC,GAAYA,GAAsBA,EAAM,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,MAAM,CAAC,CAAC,IAAI,GAAWC,EAASF,EAAcD,EAAa,IAAI,EAAQI,EAAOH,EAAcD,EAAa,EAAE,EAAE,OAAOG,IAAW,MAAMC,IAAS,IAAK,CAG5b,SAAwBC,EAAqBC,EAAM,CAAC,GAAK,CAACC,oBAAkBD,EAAW,CAACN,gBAAcL,EAAc,EAAQa,EAAgBtB,EAAO,EAAK,EAA0L,OAAxLC,MAAc,CAAIqB,EAAgB,SAAkB,OAAOD,GAAmB,YAAqBR,EAAeC,CAAY,IAAGQ,EAAgB,QAAQ,GAAKD,EAAiB,EAAG,EAAE,CAAC,CAAC,EAAsBnB,gBAAK,MAAM,CAAC,MAAM,CAAC,SAAS,WAAW,MAAM,EAAE,OAAO,EAAE,SAAS,SAAS,cAAc,MAAM,CAAC,CAAC,CAAE,C,0CAACS,EAAoBQ,EAAqB,CAAC,iBAAiB,CAAC,KAAKP,EAAY,aAAa,MAAM,oBAAoB,CAAC,CAAC,C"}