{
  "version": 3,
  "sources": ["../../../../../../owl-nest/ulule/common/previewable/src/ImpactBlock.tsx"],
  "sourcesContent": ["import * as React from 'react'\nimport styled from 'styled-components'\n\nimport * as plume from '@ulule/owl-kit-components/next'\nimport * as model from '@owl-nest/models'\nimport * as api from '@owl-nest/api-client/latest'\nimport { t } from '@owl-nest/localize'\n\ntype ImpactBlockProps = {\n  impact: model.impact.Impact\n  lang?: api.Lang\n  sdgHelpUrl: api.I18n\n}\n\nexport function ImpactBlock({ impact, lang, sdgHelpUrl }: ImpactBlockProps): React.ReactElement<ImpactBlockProps> {\n  const impactText = (lang && impact.impact[lang]) || model.i18n.get(impact.impact)\n  const certificationsText = (lang && impact.certifications[lang]) || model.i18n.get(impact.certifications)\n\n  return (\n    <Wrapper>\n      <plume.styles.heading.M>{t('Impact of your project')}</plume.styles.heading.M>\n      <plume.styles.copy.M>{impactText}</plume.styles.copy.M>\n      {certificationsText && (\n        <>\n          <plume.styles.heading.XXS>{t('Labels and certifications')}</plume.styles.heading.XXS>\n          <plume.styles.copy.M>{certificationsText}</plume.styles.copy.M>\n        </>\n      )}\n      {impact.sdgs.length !== 0 && (\n        <>\n          <plume.styles.heading.XXS>{t('Sustainable Development Goals')}</plume.styles.heading.XXS>\n          <SDGList>\n            {impact.sdgs.map((projectSDG) => {\n              if (projectSDG.deleted || !projectSDG.sdg) {\n                return null\n              }\n\n              const imageResource = model.i18n.get(projectSDG.sdg.logo)\n              if (imageResource === undefined) {\n                return null\n              }\n\n              const descriptionText = (lang && projectSDG.description[lang]) || model.i18n.get(projectSDG.description)\n\n              return (\n                <SDGItem key={projectSDG.sdg.code}>\n                  <img alt=\"\" src={model.image.getUrl(imageResource.versions, 'full')} />\n                  <Description>\n                    <plume.styles.heading.XXXS>{model.i18n.get(projectSDG.sdg.title)}</plume.styles.heading.XXXS>\n                    <plume.styles.copy.S>{descriptionText}</plume.styles.copy.S>\n                  </Description>\n                </SDGItem>\n              )\n            })}\n          </SDGList>\n          <plume.styles.copy.S>\n            <plume.Link kind=\"secondary\" href={model.i18n.get(sdgHelpUrl)} target=\"_blank\" rel=\"nooponer noreferrer\">\n              {t('Learn more on Sustainable Development Goals by the UN')}\n            </plume.Link>\n          </plume.styles.copy.S>\n        </>\n      )}\n    </Wrapper>\n  )\n}\n\nconst Wrapper = styled.div`\n  word-break: break-word;\n  max-width: 394px;\n\n  ${plume.styles.heading.M} {\n    margin-bottom: 9px;\n  }\n\n  ${plume.styles.copy.M} {\n    margin-bottom: 20px;\n  }\n\n  ${plume.styles.heading.XXS} {\n    margin-bottom: 20px;\n  }\n\n  ${plume.Link} {\n    margin-top: 10px;\n  }\n`\n\nconst Description = styled.div`\n  display: flex;\n  flex-direction: column;\n`\n\nconst SDGItem = styled.li`\n  display: flex;\n  flex-direction: row;\n  align-items: flex-start;\n\n  img {\n    flex: 0 0 auto;\n    width: 80px;\n    margin-right: 10px;\n  }\n`\n\nconst SDGList = styled.ol`\n  margin: 0;\n  padding: 0;\n  list-style: none;\n\n  ${SDGItem} {\n    margin-bottom: 20px;\n  }\n`\n"],
  "mappings": "wMAAAA,IAAAC,IAAA,IAAAC,EAAuB,OAchB,SAASC,EAAY,CAAE,OAAAC,EAAQ,KAAAC,EAAM,WAAAC,CAAW,EAA2D,CAChH,IAAMC,EAAcF,GAAQD,EAAO,OAAOC,CAAI,GAAYG,EAAK,IAAIJ,EAAO,MAAM,EAC1EK,EAAsBJ,GAAQD,EAAO,eAAeC,CAAI,GAAYG,EAAK,IAAIJ,EAAO,cAAc,EAExG,OACE,gBAACM,EAAA,KACC,gBAAOC,EAAO,QAAQ,EAArB,QAAwB,KAAE,wBAAwB,CAAE,EACrD,gBAAOA,EAAO,KAAK,EAAlB,KAAqBJ,CAAW,EAChCE,GACC,gCACE,gBAAOE,EAAO,QAAQ,IAArB,QAA0B,KAAE,2BAA2B,CAAE,EAC1D,gBAAOA,EAAO,KAAK,EAAlB,KAAqBF,CAAmB,CAC3C,EAEDL,EAAO,KAAK,SAAW,GACtB,gCACE,gBAAOO,EAAO,QAAQ,IAArB,QAA0B,KAAE,+BAA+B,CAAE,EAC9D,gBAACC,EAAA,KACER,EAAO,KAAK,IAAKS,GAAe,CAC/B,GAAIA,EAAW,SAAW,CAACA,EAAW,IACpC,OAAO,KAGT,IAAMC,EAAsBN,EAAK,IAAIK,EAAW,IAAI,IAAI,EACxD,GAAIC,IAAkB,OACpB,OAAO,KAGT,IAAMC,EAAmBV,GAAQQ,EAAW,YAAYR,CAAI,GAAYG,EAAK,IAAIK,EAAW,WAAW,EAEvG,OACE,gBAACG,EAAA,CAAQ,IAAKH,EAAW,IAAI,MAC3B,gBAAC,OAAI,IAAI,GAAG,IAAWI,EAAM,OAAOH,EAAc,SAAU,MAAM,EAAG,EACrE,gBAACI,EAAA,KACC,gBAAOP,EAAO,QAAQ,KAArB,KAAiCH,EAAK,IAAIK,EAAW,IAAI,KAAK,CAAE,EACjE,gBAAOF,EAAO,KAAK,EAAlB,KAAqBI,CAAgB,CACxC,CACF,CAEJ,CAAC,CACH,EACA,gBAAOJ,EAAO,KAAK,EAAlB,KACC,gBAAOQ,EAAN,CAAW,KAAK,YAAY,KAAYX,EAAK,IAAIF,CAAU,EAAG,OAAO,SAAS,IAAI,0BAChF,KAAE,uDAAuD,CAC5D,CACF,CACF,CAEJ,CAEJ,CAhEA,IAAAc,EAkEMV,EAAUW,EAAO,IAAPD,MAAUE,EAAA,0DAIA,yCAIH,0CAIK,0CAId,sCAZJX,EAAO,QAAQ,EAIfA,EAAO,KAAK,EAIZA,EAAO,QAAQ,IAIfQ,GAlFVI,EAuFML,EAAcG,EAAO,IAAPE,MAAUD,EAAA,uDAvF9BE,EA4FMR,EAAUK,EAAO,GAAPG,MAASF,EAAA,gKA5FzBG,EAwGMb,EAAUS,EAAO,GAAPI,MAASH,EAAA,4DAKd,yCAAPN",
  "names": ["init_define_process_env", "init_sentry_release_injection_stub", "React", "ImpactBlock", "impact", "lang", "sdgHelpUrl", "impactText", "i18n_exports", "certificationsText", "Wrapper", "styles_exports", "SDGList", "projectSDG", "imageResource", "descriptionText", "SDGItem", "image_exports", "Description", "Link", "_a", "src_default", "__template", "_b", "_c", "_d"]
}