{
	"$schema": "https://schemas.wp.org/trunk/block.json",
	"apiVersion": 3,
	"name": "rooster/promo-tile",
	"version": "1.0.0",
	"title": "Promo tile",
	"category": "theme",
	"icon": "megaphone",
	"description": "Art-directed image, heading, text and a call to action; optionally shown to selected roles only.",
	"keywords": [ "promo", "banner", "cta", "tile" ],
	"textdomain": "ai-eshop-optimizer",
	"attributes": {
		"imageId": { "type": "integer", "default": 0 },
		"mobileId": { "type": "integer", "default": 0 },
		"heading": { "type": "string", "default": "" },
		"body": { "type": "string", "default": "" },
		"ctaText": { "type": "string", "default": "" },
		"ctaHref": { "type": "string", "default": "" },
		"roles": { "type": "string", "default": "" }
	},
	"supports": {
		"html": false,
		"align": [ "wide", "full" ],
		"color": { "background": true, "text": true },
		"spacing": { "padding": true, "margin": true },
		"rooster": { "defer": { "allowed": true, "height": "320px", "default": "inline" } }
	},
	"rooster": {
		"ui": {
			"imageId": { "control": "media", "label": "Image" },
			"mobileId": { "control": "media", "label": "Mobile image (optional)" },
			"body": { "control": "textarea", "label": "Text" },
			"ctaText": { "label": "Button text" },
			"ctaHref": { "control": "url", "label": "Button link" },
			"roles": { "label": "Show only to roles (comma-separated; pages with role-gated tiles are not cacheable)" }
		}
	},
	"render": "file:./render.php"
}
