{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "section-blocks/image-box",
  "version": "1.0.0",
  "title": "Image Box",
  "category": "section-blocks-elements",
  "icon": "format-image",
  "description": "An image with a title and text, shown as a card, as text over the image, or side by side — with a fixed aspect ratio, focal point, hover zoom and an optional link on the whole box.",
  "keywords": [
    "image",
    "card",
    "box",
    "feature",
    "overlay",
    "teaser",
    "link"
  ],
  "textdomain": "section-blocks",
  "attributes": {
    "image": {
      "type": "object",
      "default": {}
    },
    "title": {
      "type": "string",
      "default": ""
    },
    "titleLevel": {
      "type": "number",
      "default": 3
    },
    "text": {
      "type": "string",
      "default": ""
    },
    "url": {
      "type": "string",
      "default": ""
    },
    "opensInNewTab": {
      "type": "boolean",
      "default": false
    },
    "boxStyle": {
      "type": "string",
      "enum": [
        "card",
        "overlay",
        "side"
      ],
      "default": "card"
    },
    "aspectRatio": {
      "type": "string",
      "enum": [
        "16/9",
        "4/3",
        "1/1",
        "3/4"
      ],
      "default": "4/3"
    },
    "hoverZoom": {
      "type": "boolean",
      "default": true
    }
  },
  "supports": {
    "html": false,
    "anchor": true,
    "color": {
      "background": true,
      "text": true,
      "link": true
    },
    "spacing": {
      "margin": true,
      "padding": true,
      "__experimentalSkipSerialization": [
        "padding"
      ]
    },
    "typography": {
      "fontSize": true,
      "lineHeight": true
    },
    "__experimentalBorder": {
      "color": true,
      "radius": true,
      "style": true,
      "width": true
    },
    "shadow": true
  },
  "example": {
    "attributes": {
      "image": {
        "url": "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 600'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%2393c5fd'/%3E%3Cstop offset='1' stop-color='%23fde68a'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='800' height='600' fill='url(%23g)'/%3E%3Ccircle cx='600' cy='170' r='70' fill='%23fbbf24'/%3E%3Cpath d='M0 600V430l220-170 180 140 160-100 240 160v140z' fill='%23047857'/%3E%3Cpath d='M0 600V500l300-90 260 70 240-40v160z' fill='%23065f46'/%3E%3C/svg%3E",
        "alt": ""
      },
      "title": "Guided mountain hikes",
      "text": "Small groups, local guides and routes for every level.",
      "url": "#"
    }
  },
  "editorScript": "file:./index.js",
  "style": [
    "file:./style-index.css",
    "section-blocks-shared"
  ],
  "render": "file:./render.php"
}