{"version":3,"file":"LocalizedImage.DVkEjoK9.mjs","names":[],"sources":["https:/framerusercontent.com/modules/7umoXGu7Ge1uIxAdzCjC/nE1DxPG6vu8Wwz3yk5pN/LocalizedImage.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useLocaleInfo}from\"framer\";/**\n * Localized Image\n *\n * Affiche l'image française ou anglaise selon la langue active de la page.\n * Le texte alternatif est une propriété texte, donc traduisible dans Localization.\n *\n * @framerIntrinsicWidth 560\n * @framerIntrinsicHeight 480\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function LocalizedImage(props){const{imageFr,imageEn,alt=\"\",radius=20,displayWidth=560,priority=false,style}=props;const{activeLocale}=useLocaleInfo();const code=(activeLocale?.code??\"\").toLowerCase();const image=code.startsWith(\"en\")&&imageEn?.src?imageEn:imageFr;if(!image?.src){return /*#__PURE__*/_jsx(\"div\",{style:{...style,position:\"relative\",width:\"100%\",aspectRatio:\"7 / 6\",borderRadius:radius,background:\"#f5f5f7\"}});}return /*#__PURE__*/_jsx(\"img\",{src:image.src,srcSet:image.srcSet,sizes:`(max-width: 809px) 100vw, ${displayWidth}px`,alt:alt,loading:priority?\"eager\":\"lazy\",decoding:\"async\",// @ts-ignore fetchpriority est un attribut HTML valide\nfetchpriority:priority?\"high\":\"auto\",style:{...style,position:\"relative\",display:\"block\",width:\"100%\",height:\"auto\",borderRadius:radius}});}addPropertyControls(LocalizedImage,{imageFr:{type:ControlType.ResponsiveImage,title:\"Image FR\"},imageEn:{type:ControlType.ResponsiveImage,title:\"Image EN\"},alt:{type:ControlType.String,title:\"Alt\",defaultValue:\"\",displayTextArea:true},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:20,min:0,max:48,unit:\"px\"},displayWidth:{type:ControlType.Number,title:\"Display width\",defaultValue:560,min:200,max:1400,unit:\"px\"},priority:{type:ControlType.Boolean,title:\"Priority\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LocalizedImage\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"480\",\"framerIntrinsicWidth\":\"560\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LocalizedImage.map"],"mappings":"qKAWG,SAAwB,EAAe,EAAM,CAAC,GAAK,CAAC,UAAQ,UAAQ,MAAI,GAAG,SAAO,GAAG,eAAa,IAAI,WAAS,GAAM,SAAO,EAAW,CAAC,gBAAc,EAAc,EAA0D,GAA5C,GAAc,MAAM,GAAA,CAAI,YAA6B,CAAC,CAAC,WAAW,IAAI,GAAG,GAAS,IAAI,EAAQ,EAA0K,OAA9J,GAAO,IAA2K,EAAK,MAAM,CAAC,IAAI,EAAM,IAAI,OAAO,EAAM,OAAO,MAAM,6BAA6B,EAAa,IAAQ,MAAI,QAAQ,EAAS,QAAQ,OAAO,SAAS,QACpmB,cAAc,EAAS,OAAO,OAAO,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,QAAQ,QAAQ,MAAM,OAAO,OAAO,OAAO,aAAa,CAAM,CAAC,CAAC,EADsL,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAM,SAAS,WAAW,MAAM,OAAO,YAAY,QAAQ,aAAa,EAAO,WAAW,SAAS,CAAC,CAAC,CAC/S,iBAZjG,IAAkE,EAYgC,EAAoB,EAAe,CAAC,QAAQ,CAAC,KAAK,EAAY,gBAAgB,MAAM,UAAU,EAAE,QAAQ,CAAC,KAAK,EAAY,gBAAgB,MAAM,UAAU,EAAE,IAAI,CAAC,KAAK,EAAY,OAAO,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAI,EAAE,OAAO,CAAC,KAAK,EAAY,OAAO,MAAM,SAAS,aAAa,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK,IAAI,EAAE,aAAa,CAAC,KAAK,EAAY,OAAO,MAAM,gBAAgB,aAAa,IAAI,IAAI,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE,SAAS,CAAC,KAAK,EAAY,QAAQ,MAAM,WAAW,aAAa,EAAK,CAAC,CAAC"}