{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "personalizewp-pro/product-collection",
  "version": "1.0.1",
  "title": "Product Collection",
  "description": "Create personalized product collections that adapt to each visitor. Choose between showing recently viewed products or segment-based recommendations.",
  "category": "personalizewp",
  "keywords": [
    "PersonalizeWP",
    "pwp",
    "WooCommerce",
    "personalization",
    "products",
    "collection",
    "previously viewed",
    "recommended"
  ],
  "textdomain": "personalizewp",
  "attributes": {
    "queryId": {
      "type": "string"
    },
    "query": {
      "type": "object",
      "default": {
        "perPage": 8,
        "postType": "product",
        "order": "desc",
        "orderBy": "date",
        "inherit": false,
        "isProductCollectionBlock": true
      }
    },
    "displayLayout": {
      "type": "object",
      "default": {
        "type": "flex",
        "columns": 3
      }
    },
    "layoutType": {
      "type": "string",
      "default": "grid",
      "enum": [
        "grid",
        "list"
      ]
    },
    "gridColumns": {
      "type": "number",
      "default": 3,
      "minimum": 1,
      "maximum": 6
    },
    "collection": {
      "type": "string"
    },
    "pwpRecipe": {
      "type": "string",
      "enum": [
        "previously-viewed",
        "products-for-you"
      ]
    },
    "pwpFallbackBehavior": {
      "type": "string",
      "default": "show_all",
      "enum": [
        "show_all",
        "hide_block",
        "show_message"
      ]
    },
    "pwpMaxProducts": {
      "type": "number",
      "default": 8,
      "minimum": 1,
      "maximum": 20
    },
    "pwpFallbackMessage": {
      "type": "string",
      "default": "Discover our featured products"
    },
    "pwpCollectionTitle": {
      "type": "string",
      "default": ""
    }
  },
  "providesContext": {
    "queryId": "queryId",
    "query": "query",
    "displayLayout": "displayLayout",
    "collection": "collection",
    "pwpRecipe": "pwpRecipe"
  },
  "usesContext": [
    "templateSlug",
    "postId"
  ],
  "supports": {
    "align": [
      "wide",
      "full"
    ],
    "anchor": true,
    "html": false,
    "interactivity": true,
    "spacing": {
      "margin": true,
      "padding": true
    },
    "color": {
      "text": true,
      "background": true
    },
    "typography": {
      "fontSize": true,
      "lineHeight": true
    }
  },
  "example": {
    "attributes": {
      "pwpRecipe": "previously-viewed",
      "pwpMaxProducts": 4,
      "gridColumns": 2
    }
  },
  "editorScript": "file:./index.js",
  "viewScript": "file:./view.js",
  "style": "file:./style-index.css",
  "editorStyle": "file:./index.css"
}