{
	"$schema": "https://schemas.wp.org/trunk/block.json",
	"apiVersion": 3,
	"name": "pollify/poll",
	"version": "1.0.0",
	"title": "Poll",
	"category": "pollify",
	"description": "Poll block for creating poll with posts",
	"supports": {
		"align": [ "center", "full", "wide" ],
		"alignWide": true,
		"html": false,
		"class": true,
		"color": {
			"background": true,
			"text": true,
			"border": true
		},
		"spacing": {
			"margin": true,
			"padding": true,
			"width": true
		},
		"__experimentalBorder": {
			"color": true,
			"radius": true,
			"style": true,
			"width": true,
			"__experimentalDefaultControls": {
				"color": true,
				"radius": true,
				"style": true,
				"width": true
			}
		}
	},
	"attributes": {
        "pollId": {
            "type": "integer",
			"default": 0
        },
        "pollClientId": {
            "type": "string",
			"default": ""
        },
        "title": {
            "type": "string",
			"default": ""
        },
        "description": {
            "type": "string",
			"default": ""
        },
		"options": {
			"type": "array",
			"default": []
		},
		"optionType": {
			"type": "string",
			"default": "radio"
		},
		"status": {
			"type": "string",
			"default": "publish"
		},
		"endDate": {
			"type": "string",
			"default": null
		},
		"closePollState": {
			"type": "string",
			"default": "show-result"
		},
		"closePollmessage": {
			"type": "string",
			"default": "This poll is closed."
		},
		"submitButtonLabel" : {
			"type": "string",
			"default": "Vote"
		},
		"submitButtonBgColor" : {
			"type": "string",
			"default": "#3858e9"
		},
		"submitButtonTextColor" : {
			"type": "string",
			"default": "#ffffff"
		},
		"submitButtonHoverBgColor" : {
			"type": "string",
			"default": "#000000"
		},
		"submitButtonHoverTextColor" : {
			"type": "string",
			"default": "#ffffff"
		},
		"submitButtonWidth" : {
			"type": "number",
			"default": 25
		},
		"submitButtonAlign" : {
			"type": "string",
			"default": "left"
		},
		"closingBannerBgColor" : {
			"type": "string",
			"default": "#f8dad8"
		},
		"closingBannerTextColor" : {
			"type": "string",
			"default": "#d82e20"
		},
		"confirmationMessageType" : {
			"type": "string",
			"default": "view-message"
		},
		"confirmationMessage" : {
			"type": "string",
			"default": "Thank you for voting!"
		},
		"viewResultconfirmationMessage" : {
			"type": "string",
			"default": "Thank you for voting!"
		},
		"allowedPerComputerResponse" : {
			"type": "boolean",
			"default": false
		},
		"anonymousVoting" : {
			"type": "boolean",
			"default": false
		},
		"anonymousVotingMethod" : {
			"type": "string",
			"default": "localStorage"
		},
		"requireLogin" : {
			"type": "boolean",
			"default": false
		},
		"requireLoginMessage" : {
			"type": "string",
			"default": "Please log in to vote."
		},
		"requireLoginAction" : {
			"type": "string",
			"default": "hide",
			"enum": ["hide", "popup"]
		},
		"requireLoginUrl" : {
			"type": "string",
			"default": ""
		},
		"style": {
			"type": "object",
			"default": {
				"color": {
					"background": "#ffffff",
					"text": "#222222",
					"border": "#e6e6e6"
				},
				"spacing": {
					"padding": {
						"top": "30px",
						"right": "30px",
						"bottom": "30px",
						"left": "30px"
					}
				},
				"border": {
					"color": "#fafafa",
					"style": "solid",
					"width": "3px"
				}
			}
		}
    },
	"textdomain": "pollify",
	"editorScript": "file:./index.js",
	"style": "file:./style-index.css",
	"viewScript": "file:./view.js"
}
