{
	"$schema": "https://schemas.wp.org/trunk/block.json",
	"apiVersion": 3,
	"name": "rooster/cart-badge",
	"version": "1.0.0",
	"title": "Cart badge",
	"category": "theme",
	"icon": "cart",
	"description": "Cart icon with the item count, hydrated from the Store API after the first human interaction so guest pages stay fully cacheable. Opens Rooster One's side cart (rooster:cart:open) when present, else links to the cart.",
	"keywords": [ "cart", "basket", "badge", "count", "header" ],
	"textdomain": "ai-eshop-optimizer",
	"attributes": {
		"icon": { "type": "string", "enum": [ "cart", "bag" ], "default": "bag" },
		"showZero": { "type": "boolean", "default": false },
		"label": { "type": "string", "default": "" }
	},
	"supports": {
		"html": false,
		"color": { "background": true, "text": true },
		"interactivity": true,
		"rooster": { "defer": { "allowed": false } }
	},
	"rooster": {
		"ui": {
			"icon": { "control": "icon", "label": "Icon" },
			"showZero": { "label": "Show the badge when the cart is empty" },
			"label": { "label": "Accessible label (defaults to “Cart”)" }
		}
	},
	"render": "file:./render.php",
	"viewScriptModule": "file:./view.min.js"
}
