{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"landingPage": "/shop/",
	"preferredVersions": {
		"php": "8.3",
		"wp": "latest"
	},
	"features": {
		"networking": true
	},
	"steps": [
		{
			"step": "login"
		},
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "wordpress.org/plugins",
				"slug": "woocommerce"
			}
		},
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "wordpress.org/plugins",
				"slug": "wp-consent-api"
			}
		},
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "wordpress.org/plugins",
				"slug": "advanced-pixel-for-barion"
			},
			"options": {
				"activate": true
			}
		},
		{
			"step": "runPHP",
			"code": "<?php require '/wordpress/wp-load.php'; delete_transient( '_wc_activation_redirect' ); update_option( 'woocommerce_onboarding_profile', array( 'completed' => true ) ); ?>"
		},
		{
			"step": "setSiteOptions",
			"options": {
				"blogname": "Advanced Pixel for Barion Demo Store",
				"woocommerce_currency": "EUR",
				"woocommerce_store_address": "Váci út 1",
				"woocommerce_store_city": "Budapest",
				"woocommerce_store_postcode": "1132",
				"woocommerce_default_country": "HU",
				"woocommerce_coming_soon": "no"
			}
		},
		{
			"step": "runPHP",
			"code": "<?php require '/wordpress/wp-load.php'; update_option( 'wc_barion_pixel_settings', array( 'pixel_id' => 'BP-DemoPixel1-00', 'enable_full_tracking' => true, 'debug_mode' => true ) ); ?>"
		},
		{
			"step": "writeFile",
			"path": "/wordpress/wp-content/mu-plugins/blueprint-demo-notice.php",
			"data": "<?php add_action('wp_body_open', function() { if (is_admin()) return; echo '<div style=\"background:#1e1e2e;color:#cdd6f4;padding:12px 20px;text-align:center;font-family:system-ui,sans-serif;font-size:14px;\">Open your browser\\'s <strong>Developer Console</strong> (F12) to see <code style=\"background:#313244;padding:2px 6px;border-radius:3px;color:#89b4fa;\">[Barion Pixel]</code> debug logs as you browse the store.</div>'; });"
		},
		{
			"step": "writeFile",
			"path": "/wordpress/wp-content/mu-plugins/blueprint-demo-consent-banner.php",
			"data": "<?php\nadd_filter('wp_get_consent_type', function() { return 'optin'; });\nadd_action('wp_footer', function() {\n  if (is_admin()) return;\n  ?>\n  <div id=\"demo-consent-banner\" style=\"position:fixed;bottom:0;left:0;right:0;background:#1e1e2e;color:#cdd6f4;padding:16px 20px;z-index:99999;font-family:system-ui,sans-serif;display:none;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;box-shadow:0 -4px 12px rgba(0,0,0,0.3);\">\n    <span>Demo cookie banner &mdash; this site uses the <strong>WP Consent API</strong>. Accept to enable Barion Pixel marketing tracking.</span>\n    <button id=\"demo-consent-accept\" style=\"background:#89b4fa;color:#1e1e2e;border:0;padding:8px 16px;border-radius:4px;cursor:pointer;font-weight:600;\">Accept marketing</button>\n    <button id=\"demo-consent-reject\" style=\"background:transparent;color:#cdd6f4;border:1px solid #cdd6f4;padding:8px 16px;border-radius:4px;cursor:pointer;\">Reject</button>\n  </div>\n  <script>\n  document.addEventListener('DOMContentLoaded', function() {\n    var banner = document.getElementById('demo-consent-banner');\n    if (!banner) return;\n    if (document.cookie.indexOf('demo_consent_set=1') === -1) { banner.style.display = 'flex'; }\n    function setConsent(val) {\n      if (typeof wp_set_consent === 'function') {\n        wp_set_consent('marketing', val);\n        wp_set_consent('statistics', val);\n      }\n      document.cookie = 'demo_consent_set=1; path=/; max-age=86400';\n      banner.style.display = 'none';\n    }\n    document.getElementById('demo-consent-accept').addEventListener('click', function() { setConsent('allow'); });\n    document.getElementById('demo-consent-reject').addEventListener('click', function() { setConsent('deny'); });\n  });\n  </script>\n  <?php\n});\n"
		},
		{
			"step": "importWxr",
			"file": {
				"resource": "url",
				"url": "https://raw.githubusercontent.com/woocommerce/woocommerce/trunk/plugins/woocommerce/sample-data/sample_products.xml"
			}
		}
	]
}
