{
	"$schema": "https://schemas.wp.org/trunk/block.json",
	"apiVersion": 3,
	"name": "rooster/consent",
	"version": "1.0.0",
	"title": "Cookie consent",
	"category": "theme",
	"icon": "privacy",
	"description": "A cookie consent banner that lives in the deferred layer (never in the first HTML), stores the choice in one record (rooster_consent) and fires rooster:consent:changed, which gates every third-party script registered with the theme.",
	"keywords": [ "cookie", "consent", "gdpr", "privacy", "banner" ],
	"textdomain": "ai-eshop-optimizer",
	"attributes": {
		"heading": { "type": "string", "default": "" },
		"text": { "type": "string", "default": "" },
		"showChoices": { "type": "boolean", "default": true },
		"position": { "type": "string", "enum": [ "bottom", "bottom-left", "center" ], "default": "bottom" },
		"buttonCorner": { "type": "string", "enum": [ "start", "end" ], "default": "start" }
	},
	"supports": {
		"html": false,
		"color": { "background": true, "text": true },
		"interactivity": true,
		"rooster": { "defer": { "allowed": true, "height": "0px", "default": "layer" } }
	},
	"rooster": {
		"ui": {
			"text": { "control": "textarea", "label": "Text (a link to the privacy policy is added automatically)" },
			"showChoices": { "label": "Offer per-category choices (functional, analytics, marketing)" },
			"position": { "label": "Position" },
			"buttonCorner": { "label": "Cookie preferences button: the start corner (left) or the end corner (right, beside a chat)" }
		},
		"notice": "Place it once, in the footer part. It renders only after the first human interaction, as an overlay, so it never shifts the page or loads for crawlers."
	},
	"render": "file:./render.php",
	"viewScriptModule": "file:./view.min.js"
}
