title: Card
fields:
  -
    import: set_type_selector
  -
    handle: image
    field:
      max_files: 1
      min_files: 1
      container: assets
      type: assets
      display: Image
      localizable: false
      validate:
        - required
        - sometimes
      if:
        set_type: 'equals image'
      listable: false
      sortable: false
  -
    import: icon_selector
  -
    handle: heading
    field:
      type: text
      display: Heading
      localizable: false
      validate:
        - required
        - sometimes
      if:
        set_type: 'not empty'
      listable: false
      sortable: false
  -
    handle: subheading
    field:
      type: textarea
      display: Subheading
      localizable: false
      listable: false
      sortable: false
      if:
        set_type: 'not empty'
  -
    import: optional_type_link
  -
    handle: call_to_action
    field:
      type: toggle
      display: 'Call to action'
      localizable: false
      validate:
        - sometimes
      if:
        set_type: 'not empty'
      listable: false
      sortable: false
  -
    handle: call_to_action_text
    field:
      type: text
      display: 'Call to action text'
      localizable: false
      validate:
        - required
        - sometimes
      if:
        set_type: 'not empty'
        call_to_action: 'equals true'
      listable: false
      sortable: false
