{
  "format": "autothreads.config-template",
  "version": 1,
  "profiles": {
    "media": {
      "name": "Visual creations",
      "matchingDefinition": {
        "root": {
          "type": "condition",
          "condition": "MEDIA_PRESENT",
          "acceptance": {
            "kinds": [
              "IMAGE",
              "VIDEO"
            ],
            "urlPolicy": "STRICT"
          }
        }
      },
      "allowAutomatedMessages": false
    }
  },
  "questions": [
    {
      "id": "channel",
      "type": "channel",
      "label": "Showcase channel",
      "required": true
    },
    {
      "id": "reactions",
      "type": "boolean",
      "label": "Celebrate creations with reactions?",
      "default": true
    },
    {
      "id": "emojis",
      "type": "emojiList",
      "label": "Reactions",
      "default": [
        "🎨",
        "👏"
      ],
      "required": true,
      "visibleWhen": {
        "question": "reactions",
        "equals": true
      }
    },
    {
      "id": "sticky",
      "type": "boolean",
      "label": "Add a sticky message?",
      "default": true
    },
    {
      "id": "intro",
      "type": "message",
      "label": "Channel introduction",
      "required": true,
      "default": {
        "flags": 32768,
        "components": [
          {
            "type": 10,
            "content": "Share your images or videos and discuss them in the attached thread. Respect everyone’s work!"
          }
        ]
      },
      "visibleWhen": {
        "question": "sticky",
        "equals": true
      }
    }
  ],
  "blocks": [
    {
      "id": "threads",
      "values": {
        "autothreads": {
          "name": "Creations",
          "channelId": {
            "$answer": "channel"
          },
          "detectionProfileId": {
            "$profile": "media"
          },
          "welcomeEnabled": false,
          "namingDefinition": {
            "rules": [
              {
                "type": "template",
                "template": "{firstLine}"
              },
              {
                "type": "template",
                "template": "Creation by {displayName}"
              }
            ]
          }
        }
      }
    },
    {
      "id": "reactions",
      "when": {
        "question": "reactions",
        "equals": true
      },
      "values": {
        "autoreact": {
          "name": "Encouragement",
          "channelId": {
            "$answer": "channel"
          },
          "detectionProfileId": {
            "$profile": "media"
          },
          "emojis": {
            "$answer": "emojis"
          }
        }
      }
    },
    {
      "id": "sticky",
      "when": {
        "question": "sticky",
        "equals": true
      },
      "values": {
        "stickyMessages": {
          "channelId": {
            "$answer": "channel"
          },
          "payload": {
            "$answer": "intro"
          }
        }
      }
    }
  ],
  "name": "Creative showcase",
  "description": "Open discussions around images and videos, with optional reactions and guidelines."
}
