{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "swift-checkout/add-to-cart",
  "version": "1.0.0",
  "title": "Swift Checkout",
  "category": "swift-checkout",
  "icon": "cart",
  "description": "A Swift Checkout add to cart block with customizable styles.",
  "keywords": [
    "add to cart",
    "cart",
    "checkout"
  ],
  "supports": {
    "html": true,
    "align": true,
    "alignWide": true,
    "anchor": true,
    "className": true,
    "color": {
      "text": true,
      "background": true
    },
    "typography": {
      "fontSize": true,
      "lineHeight": true,
      "__experimentalFontFamily": true,
      "__experimentalFontWeight": true,
      "__experimentalFontStyle": true,
      "__experimentalTextTransform": true,
      "__experimentalLetterSpacing": true
    },
    "spacing": {
      "margin": true,
      "padding": true
    }
  },
  "attributes": {
    "content": {
      "type": "string",
      "default": "Add to Cart"
    },
    "productId": {
      "type": "number"
    },
    "auto_add_to_cart": {
      "type": "boolean",
      "default": false
    },
    "tag": {
      "type": "string",
      "default": "h2"
    },
    "align": {
      "type": "string",
      "default": "center"
    },
    "textColor": {
      "type": "string"
    },
    "backgroundColor": {
      "type": "string"
    },
    "fontSize": {
      "type": "string"
    },
    "style": {
      "type": "object"
    },
    "stylePreset": {
      "type": "string",
      "default": "simple"
    },
    "enable_custom_fields": {
      "type": "boolean",
      "default": false
    },
    "checkout_fields": {
      "type": "array",
      "default": [
        {
          "field_type": "name",
          "field_required": true,
          "field_label": "Full Name",
          "field_placeholder": ""
        },
        {
          "field_type": "phone",
          "field_required": true,
          "field_label": "Phone",
          "field_placeholder": ""
        },
        {
          "field_type": "email",
          "field_required": true,
          "field_label": "Email Address",
          "field_placeholder": ""
        },
        {
          "field_type": "address_1",
          "field_required": true,
          "field_label": "Full Address",
          "field_placeholder": ""
        }
      ]
    },
    "cartButtonAlignment": {
      "type": "string",
      "default": "button-left"
    },
    "anchor": {
      "type": "string"
    },
    "className": {
      "type": "string"
    }
  },
  "textdomain": "swift-checkout",
  "editorScript": "file:./index.js",
  "editorStyle": "file:./index.css",
  "style": "file:./style-index.css",
  "render": "file:./AddToCart.php"
}