label: 'Attach'
previewHeight: 400px
onlyEdit: true
actions:
  commons:
    title: _t(AB_attach_commons_title)
    width: 40%
    showif:
      file: \.(png|jpg|jpeg|gif|pdf|svg|webp)$
    properties:
      link:
        label: _t(AB_attach_link_label)
        default: https://
        type: url
        showif:
          file: \.(png|jpg|jpeg|gif|svg|webp)$
      caption:
        label: _t(AB_attach_caption_label)
        type: text
        showif:
          file: \.(png|jpg|jpeg|gif|svg|webp)$
      legend:
        label: _t(AB_attach_legend_label)
        type: text
        showif:
          file: \.(png|jpg|jpeg|gif|svg|webp)$
      nofullimagelink:
        label: _t(AB_attach_nofullimagelink_label)
        type: checkbox
        checkedvalue: '0'
        uncheckedvalue: '1'
        showif:
          file: \.(png|jpg|jpeg|gif|svg|webp)$
      size:
        label: _t(AB_attach_size_label)
        type: list
        showif:
          file: \.(png|jpg|jpeg|gif|svg|webp)$
        options:
          small: _t(AB_attach_size_small)
          medium: _t(AB_attach_size_medium)
          big: _t(AB_attach_size_big)
          original: _t(AB_attach_size_original)
      width:
        label: _t(AB_attach_width_label)
        type: number
        advanced: true
        showif:
          file: \.(png|jpg|jpeg|gif|svg|webp)$
      height:
        label: _t(AB_attach_height_label)
        type: number
        advanced: true
        showif:
          file: \.(png|jpg|jpeg|gif|svg|webp)$
      class:
        label: _t(AB_attach_class_label)
        type: class
        subproperties:
          position:
            label: _t(AB_attach_class_position_label)
            type: list
            showif:
              file: \.(png|jpg|jpeg|gif|pdf|svg|webp)$
            options:
              '': _t(AB_attach_class_position_none)
              left: _t(AB_attach_class_position_left)
              center: _t(AB_attach_class_position_center)
              right: _t(AB_attach_class_position_right)
          displaylink:
            label: _t(AB_attach_class_displaylink_label)
            type: list
            default: ''
            options:
              '': _t(AB_attach_class_displaylink_default)
              'new-window': _t(AB_attach_class_displaylink_new-window)
              'modalbox': _t(AB_attach_class_displaylink_modalbox)
          lightshadow:
            label: _t(AB_attach_class_effect_lightshadow)
            type: checkbox
            default: ''
            checkedvalue: 'lightshadow'
            uncheckedvalue: ''
            showif:
              file: \.(png|jpg|jpeg|gif|svg|webp)$
          whiteborder:
            label: _t(AB_attach_class_effect_whiteborder)
            type: checkbox
            default: ''
            checkedvalue: 'whiteborder'
            uncheckedvalue: ''
            showif:
              file: \.(png|jpg|jpeg|gif|svg|webp)$
          zoom:
            label: _t(AB_attach_class_effect_zoom)
            type: checkbox
            default: ''
            checkedvalue: 'zoom'
            uncheckedvalue: ''
            showif:
              file: \.(png|jpg|jpeg|gif|svg|webp)$
          izmir:
            label: _t(AB_attach_class_izmir_label)
            type: list
            advanced: true
            hint: _t(AB_attach_class_izmir_hint)
            showif:
              file: \.(png|jpg|jpeg|gif)$
            options:
              c4-izmir: _t(AB_attach_class_izmir_izmir)
              c4-izmir c4-border-cc-3: _t(AB_attach_class_izmir_border)
              c4-izmir c4-image-zoom-in: _t(AB_attach_class_izmir_zoom)
              c4-izmir c4-reveal-up: _t(AB_attach_class_izmir_revealup)
              c4-izmir c4-gradient-top: _t(AB_attach_class_izmir_gradiant)
              C4-izmir c4-layout-top-center: _t(AB_attach_class_izmir_topcentertext)
  attach:
    width: 40%
    title: _t(AB_attach_attach_title)
    label: Attach
    description: _t(AB_attach_attach_description)
    properties:
      file:
        label: _t(AB_attach_file_label)
        type: text
        hint: _t(AB_attach_file_hint)
      desc:
        label: _t(ALTERNATIVE_TEXT)
        type: text
      displaypdf:
        label: _t(AB_attach_displaypdf_label)
        type: list
        default: ''
        showif:
          file: \.pdf$
        options:
          1: _t(AB_attach_yes)
          0: _t(AB_attach_no)
      ratio:
        label: _t(AB_attach_pdf_ratio_label)
        type: list
        advanced: true
        showif:
          displaypdf: 1
          file: \.pdf$
        default: ''
        options:
          portrait: _t(AB_attach_pdf_ratio_option_portrait)
          paysage: _t(AB_attach_pdf_ratio_option_paysage)
          carre: _t(AB_attach_pdf_ratio_option_carre)
      largeurmax:
        label: _t(AB_attach_pdf_largeur_max_label)
        type: number
        advanced: true
        showif:
          displaypdf: 1
          file: \.pdf$
      hauteurmax:
        label: _t(AB_attach_pdf_hauteur_max_label)
        type: number
        advanced: true
        showif:
          displaypdf: 1
          file: \.pdf$
