{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "bpsc/newsletter-section",
  "version": "1.0.0",
  "title": "Newsletter Section",
  "category": "section-collection",
  "description": "Email signup form that saves subscribers to your site, with five styles and no extra plugin.",
  "keywords": [
    "newsletter",
    "subscribe",
    "email signup",
    "mailing list",
    "form",
    "section"
  ],
  "textdomain": "section-collection",
  "usesContext": [
    "postId"
  ],
  "attributes": {
    "themeStyle": {
      "type": "object",
      "default": {
        "theme": "style-1"
      }
    },
    "sectionTag": {
      "type": "string",
      "default": "section"
    },
    "ariaLabel": {
      "type": "string",
      "default": "Newsletter signup"
    },
    "content": {
      "type": "object",
      "default": {
        "eyebrow": "NEWSLETTER",
        "heading": "Get fresh ideas in your inbox",
        "subheading": "One short email a week. No spam, unsubscribe any time.",
        "placeholder": "Enter your email",
        "namePlaceholder": "Your name",
        "buttonText": "Subscribe",
        "consentText": "I agree to receive emails and accept the {privacy}.",
        "privacyLabel": "Privacy Policy",
        "privacyUrl": "",
        "finePrint": "Join 12,000+ readers. No spam.",
        "proofText": "Join 12,000+ readers",
        "successMessage": "Thanks for subscribing! You are on the list.",
        "errorMessage": "Something went wrong. Please try again.",
        "invalidEmailMessage": "Please enter a valid email address.",
        "consentErrorMessage": "Please accept the terms to subscribe.",
        "rateLimitMessage": "Too many attempts, please try again later.",
        "image": {
          "id": null,
          "url": "",
          "alt": "",
          "title": ""
        }
      }
    },
    "elements": {
      "type": "object",
      "default": {
        "isIcon": true,
        "isEyebrow": true,
        "isHeading": true,
        "isSubheading": true,
        "isNameField": false,
        "isConsent": false,
        "isFinePrint": true,
        "isBenefits": false,
        "isImage": false,
        "isSocialProof": false
      }
    },
    "benefits": {
      "type": "array",
      "default": [
        {
          "id": "b1",
          "text": "Weekly tips and tutorials"
        },
        {
          "id": "b2",
          "text": "Exclusive subscriber offers"
        },
        {
          "id": "b3",
          "text": "Unsubscribe in one click"
        }
      ]
    },
    "avatars": {
      "type": "array",
      "default": [
        {
          "id": "a1",
          "name": "Alex",
          "image": {
            "id": null,
            "url": "",
            "alt": ""
          }
        },
        {
          "id": "a2",
          "name": "Sam",
          "image": {
            "id": null,
            "url": "",
            "alt": ""
          }
        },
        {
          "id": "a3",
          "name": "Jordan",
          "image": {
            "id": null,
            "url": "",
            "alt": ""
          }
        }
      ]
    },
    "form": {
      "type": "object",
      "default": {
        "mode": "store",
        "layout": "inline",
        "buttonIcon": "arrow",
        "redirectUrl": "",
        "externalAction": "",
        "externalEmailField": "EMAIL",
        "externalNameField": "FNAME",
        "externalNewTab": false
      }
    },
    "notify": {
      "type": "object",
      "default": {
        "enabled": false,
        "recipient": "",
        "subject": "New newsletter subscriber"
      }
    },
    "contentMaxWidth": {
      "type": "object",
      "default": {
        "desktop": "1100px",
        "tablet": "100%",
        "mobile": "100%"
      }
    },
    "alignment": {
      "type": "object",
      "default": {
        "desktop": "center",
        "tablet": "center",
        "mobile": "center"
      }
    },
    "sectionMargin": {
      "type": "object",
      "default": {
        "desktop": {
          "top": "0px",
          "right": "0px",
          "bottom": "0px",
          "left": "0px"
        },
        "tablet": {
          "top": "0px",
          "right": "0px",
          "bottom": "0px",
          "left": "0px"
        },
        "mobile": {
          "top": "0px",
          "right": "0px",
          "bottom": "0px",
          "left": "0px"
        }
      }
    },
    "sectionPadding": {
      "type": "object",
      "default": {
        "desktop": {
          "top": "80px",
          "right": "32px",
          "bottom": "80px",
          "left": "32px"
        },
        "tablet": {
          "top": "64px",
          "right": "24px",
          "bottom": "64px",
          "left": "24px"
        },
        "mobile": {
          "top": "48px",
          "right": "20px",
          "bottom": "48px",
          "left": "20px"
        }
      }
    },
    "sectionRadius": {
      "type": "number",
      "default": 0
    },
    "sectionShadow": {
      "type": "array",
      "default": []
    },
    "background": {
      "type": "object",
      "default": {
        "type": "solid",
        "color": "#f8fafc",
        "gradient": "linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%)",
        "overlayColor": "rgba(0,0,0,0)",
        "image": {
          "url": ""
        },
        "position": "center center",
        "repeat": "no-repeat",
        "size": "cover"
      }
    },
    "cardStyle": {
      "type": "object",
      "default": {
        "bg": "#ffffff",
        "borderColor": "#e2e8f0",
        "radius": 20
      }
    },
    "iconStyle": {
      "type": "object",
      "default": {
        "color": "#4f46e5",
        "bg": "#e0e7ff",
        "size": "26px"
      }
    },
    "eyebrowStyle": {
      "type": "object",
      "default": {
        "color": "#4f46e5",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 600,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 13,
            "tablet": 13,
            "mobile": 12
          },
          "lineHeight": "1.4",
          "textTransform": "none",
          "letterSpace": "0.08em"
        }
      }
    },
    "headingStyle": {
      "type": "object",
      "default": {
        "color": "#0f172a",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 700,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 40,
            "tablet": 34,
            "mobile": 28
          },
          "lineHeight": "1.2"
        }
      }
    },
    "subheadingStyle": {
      "type": "object",
      "default": {
        "color": "#475569",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 400,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 18,
            "tablet": 17,
            "mobile": 16
          },
          "lineHeight": "1.6"
        }
      }
    },
    "finePrintStyle": {
      "type": "object",
      "default": {
        "color": "#64748b",
        "linkColor": "#4f46e5",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 400,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 13,
            "tablet": 13,
            "mobile": 13
          },
          "lineHeight": "1.5"
        }
      }
    },
    "benefitStyle": {
      "type": "object",
      "default": {
        "color": "#334155",
        "iconColor": "#16a34a",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 500,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 16,
            "tablet": 15,
            "mobile": 15
          },
          "lineHeight": "1.5"
        }
      }
    },
    "proofStyle": {
      "type": "object",
      "default": {
        "color": "#475569",
        "ringColor": "#ffffff",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 500,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 14,
            "tablet": 14,
            "mobile": 14
          },
          "lineHeight": "1.4"
        }
      }
    },
    "inputStyle": {
      "type": "object",
      "default": {
        "bg": "#ffffff",
        "color": "#0f172a",
        "placeholderColor": "#94a3b8",
        "borderColor": "#cbd5e1",
        "focusColor": "#4f46e5",
        "borderWidth": "1px",
        "height": "52px",
        "radius": 10,
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 400,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 16,
            "tablet": 16,
            "mobile": 16
          }
        }
      }
    },
    "buttonStyle": {
      "type": "object",
      "default": {
        "bg": "#4f46e5",
        "color": "#ffffff",
        "hoverBg": "#4338ca",
        "hoverColor": "#ffffff",
        "radius": 10,
        "padding": {
          "desktop": {
            "top": "0px",
            "right": "26px",
            "bottom": "0px",
            "left": "26px"
          },
          "tablet": {
            "top": "0px",
            "right": "22px",
            "bottom": "0px",
            "left": "22px"
          },
          "mobile": {
            "top": "0px",
            "right": "20px",
            "bottom": "0px",
            "left": "20px"
          }
        },
        "shadow": [],
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 600,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 16,
            "tablet": 16,
            "mobile": 15
          }
        }
      }
    },
    "statusStyle": {
      "type": "object",
      "default": {
        "success": "#16a34a",
        "error": "#dc2626",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 500,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 14,
            "tablet": 14,
            "mobile": 14
          },
          "lineHeight": "1.5"
        }
      }
    },
    "imageStyle": {
      "type": "object",
      "default": {
        "radius": 16,
        "minHeight": "320px"
      }
    },
    "align": {
      "type": "string",
      "default": "full"
    }
  },
  "supports": {
    "align": [
      "wide",
      "full"
    ],
    "html": false
  },
  "example": {
    "attributes": {}
  },
  "editorScript": "file:../index.js",
  "style": "file:./view.css",
  "render": "file:./render.php",
  "viewScript": "file:./view.js"
}