{
  "collectionName": "components_blocks_ctas",
  "info": {
    "displayName": "CTA",
    "icon": "cursor",
    "preview": "previews/cta.jpg",
    "description": "Call-to-Action block with media and action links"
  },
  "attributes": {
    "section": {
      "type": "component",
      "component": "elements.section",
      "repeatable": false
    },
    "variant": {
      "type": "enumeration",
      "enum": [
        "inline-spread",
        "inline-centered",
        "inline-stacked",
        "card-stacked",
        "card-centered",
        "card-horizontal"
      ],
      "default": "inline-spread"
    },
    "image": {
      "type": "component",
      "component": "shared.image",
      "repeatable": false
    },
    "ctaText": {
      "type": "text"
    },
    "ctaLink": {
      "type": "component",
      "component": "shared.link",
      "repeatable": false,
      "description": "Primary link, used when CTA type is link or empty.",
      "conditions": {
        "visible": {
          "!=": [
            {
              "var": "ctaType"
            },
            "action"
          ]
        }
      }
    },
    "secondaryLink": {
      "type": "component",
      "component": "shared.link",
      "repeatable": false
    },
    "ctaType": {
      "type": "enumeration",
      "enum": [
        "link",
        "action"
      ],
      "default": "link",
      "description": "Primary CTA mode. Empty values use link."
    },
    "ctaAction": {
      "type": "component",
      "component": "shared.action",
      "repeatable": false,
      "description": "Used only when CTA type is action. The frontend must register a handler for this action.",
      "conditions": {
        "visible": {
          "==": [
            {
              "var": "ctaType"
            },
            "action"
          ]
        }
      }
    },
    "tracking": {
      "type": "component",
      "repeatable": false,
      "component": "shared.tracking"
    }
  }
}
