{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "title": "Pricing Table",
  "name": "brandy/pricing-table",
  "category": "brandy-blocks",
  "description": "Pricing plans side by side, with an optional chooser that switches every plan's price, period and call to action at once.",
  "keywords": [
    "pricing",
    "plans",
    "subscription",
    "billing",
    "tiers",
    "compare",
    "options"
  ],
  "attributes": {
    "terms": {
      "type": "array",
      "default": [
        {
          "label": "Monthly",
          "badge": ""
        },
        {
          "label": "Yearly",
          "badge": "Save 20%"
        }
      ]
    },
    "defaultTerm": {
      "type": "number",
      "default": 0
    },
    "planLayout": {
      "type": "string",
      "enum": [
        "classic",
        "cta-first",
        "split-header",
        "offer",
        "centered"
      ],
      "default": "classic"
    }
  },
  "variations": [
    {
      "name": "default",
      "title": "Pricing Table",
      "description": "Three plans side by side, the middle one recommended.",
      "isDefault": true,
      "scope": [
        "inserter"
      ],
      "attributes": {
        "align": "wide",
        "style": {
          "spacing": {
            "blockGap": "var:preset|spacing|30"
          }
        },
        "terms": [
          {
            "label": "Monthly",
            "badge": ""
          },
          {
            "label": "Yearly",
            "badge": "save 20%"
          }
        ]
      }
    }
  ],
  "example": {
    "viewportWidth": 1000,
    "attributes": {},
    "innerBlocks": [
      {
        "name": "brandy/pricing-options",
        "attributes": {
          "optionLayout": "segmented"
        }
      },
      {
        "name": "brandy/pricing-plan",
        "attributes": {
          "style": {
            "spacing": {
              "padding": {
                "top": "var:preset|spacing|50",
                "right": "var:preset|spacing|50",
                "bottom": "var:preset|spacing|50",
                "left": "var:preset|spacing|50"
              },
              "blockGap": "var:preset|spacing|30"
            },
            "border": {
              "radius": "14px",
              "width": "1px",
              "style": "solid"
            }
          },
          "borderColor": "brandy-border"
        },
        "innerBlocks": [
          {
            "name": "brandy/pricing-text",
            "attributes": {
              "role": "badge",
              "content": ""
            }
          },
          {
            "name": "brandy/pricing-text",
            "attributes": {
              "role": "name",
              "content": "Starter"
            }
          },
          {
            "name": "brandy/pricing-text",
            "attributes": {
              "role": "tagline",
              "content": "Put a first site live."
            }
          },
          {
            "name": "brandy/pricing-price",
            "attributes": {
              "prices": [
                {
                  "amount": "$0",
                  "period": "/month",
                  "note": "Free forever"
                },
                {
                  "amount": "$0",
                  "period": "/year",
                  "note": "Free forever"
                }
              ]
            }
          },
          {
            "name": "brandy/pricing-body",
            "attributes": {},
            "innerBlocks": [
              {
                "name": "brandy/icon-list",
                "attributes": {},
                "innerBlocks": [
                  {
                    "name": "brandy/icon-list-item",
                    "attributes": {
                      "text": "1 project"
                    }
                  },
                  {
                    "name": "brandy/icon-list-item",
                    "attributes": {
                      "text": "5 GB storage"
                    }
                  }
                ]
              }
            ]
          },
          {
            "name": "brandy/pricing-cta",
            "attributes": {
              "term": -1
            },
            "innerBlocks": [
              {
                "name": "brandy/buttons",
                "attributes": {},
                "innerBlocks": [
                  {
                    "name": "brandy/button",
                    "attributes": {
                      "text": "Start for free",
                      "url": "#"
                    }
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "name": "brandy/pricing-plan",
        "attributes": {
          "style": {
            "spacing": {
              "padding": {
                "top": "var:preset|spacing|50",
                "right": "var:preset|spacing|50",
                "bottom": "var:preset|spacing|50",
                "left": "var:preset|spacing|50"
              },
              "blockGap": "var:preset|spacing|30"
            },
            "border": {
              "radius": "14px",
              "width": "2px",
              "style": "solid"
            },
            "shadow": "var:preset|shadow|natural"
          },
          "borderColor": "brandy-primary"
        },
        "innerBlocks": [
          {
            "name": "brandy/pricing-text",
            "attributes": {
              "role": "badge",
              "content": "Most popular"
            }
          },
          {
            "name": "brandy/pricing-text",
            "attributes": {
              "role": "name",
              "content": "Pro"
            }
          },
          {
            "name": "brandy/pricing-text",
            "attributes": {
              "role": "tagline",
              "content": "For teams shipping often."
            }
          },
          {
            "name": "brandy/pricing-price",
            "attributes": {
              "prices": [
                {
                  "amount": "$29",
                  "period": "/month",
                  "note": "Billed monthly"
                },
                {
                  "amount": "$290",
                  "period": "/year",
                  "note": "Two months free"
                }
              ]
            }
          },
          {
            "name": "brandy/pricing-body",
            "attributes": {},
            "innerBlocks": [
              {
                "name": "brandy/icon-list",
                "attributes": {},
                "innerBlocks": [
                  {
                    "name": "brandy/icon-list-item",
                    "attributes": {
                      "text": "Unlimited projects"
                    }
                  },
                  {
                    "name": "brandy/icon-list-item",
                    "attributes": {
                      "text": "Priority support"
                    }
                  }
                ]
              }
            ]
          },
          {
            "name": "brandy/pricing-cta",
            "attributes": {
              "term": -1
            },
            "innerBlocks": [
              {
                "name": "brandy/buttons",
                "attributes": {},
                "innerBlocks": [
                  {
                    "name": "brandy/button",
                    "attributes": {
                      "text": "Start free trial",
                      "url": "#"
                    }
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  },
  "allowedBlocks": [
    "brandy/pricing-plan",
    "brandy/pricing-options",
    "core/group",
    "core/columns"
  ],
  "providesContext": {
    "brandy/pricingTerms": "terms",
    "brandy/pricingDefaultTerm": "defaultTerm",
    "brandy/pricingPlanLayout": "planLayout"
  },
  "supports": {
    "reusable": false,
    "html": false,
    "anchor": true,
    "align": [
      "wide",
      "full"
    ],
    "color": {
      "background": true,
      "text": true,
      "__experimentalDefaultControls": {
        "background": false,
        "text": false
      }
    },
    "spacing": {
      "margin": true,
      "padding": true,
      "blockGap": true,
      "__experimentalSkipSerialization": [
        "blockGap"
      ],
      "__experimentalDefaultControls": {
        "blockGap": true
      }
    }
  },
  "render": "file:./render.php",
  "textdomain": "brandy-blocks",
  "editorScript": "file:./index.js",
  "editorStyle": "file:./index.css",
  "style": "file:./style-index.css"
}