#see https://gitlab.bgm-gmbh.de/nov/templates/azh/-/blob/main/elements/components/c-blurb/c-blurb.types.ts

tt_content.c-blurb =< lib.twigContentElement
tt_content.c-blurb {
  templateName = elements/components/c-blurb/c-blurb.template.twig

  dataProcessing {
    /*
problem: if image/icon is set  the card will be rendered with an empty image/icon tag
if an icon is selected
solution: only render image if icon is not set
so the processor just checks if icon ist set and an unset variables.image
*/

    #10 = Bgm\BgmThemeAzh\DataProcessing\CardIconProcessor
  }

  variables {
    heading < lib.heading
    copy < lib.copy


    media {
      html =< lib.contentElement
      html {
        templateRootPaths.10 = EXT:bgm_theme_azh/Resources/Private/Templates/
        templateName = CardImage
        dataProcessing {
          10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
          10 {
            references.fieldName = media
            if.isTrue.field = media
          }
        }
        stdWrap.if.isFalse.field = icon_name
      }
      name = TEXT
      name.field = icon_name
      name.stdWrap.if.isTrue.field = icon_name
      size = 60
    }


  }
}
