{
    "$schema": "https://schemas.wp.org/trunk/block.json",
    "apiVersion": 3,
    "name": "postaffiliatepro/top-affiliates",
    "version": "1.29.2",
    "title": "Top Affiliates",
    "category": "widgets",
    "icon": "groups",
    "description": "Top Affiliates widgets allows you to add performance statistics from your Post Affiliate Pro directly to your WordPress with ease.",
    "keywords": ["affiliates", "top", "leaderboard", "postaffiliatepro"],
    "textdomain": "postaffiliatepro",
    "attributes": {
        "title": {
            "type": "string",
            "default": "Top Affiliates"
        },
        "refreshInterval": {
            "type": "integer",
            "default": 10
        },
        "orderBy": {
            "type": "string",
            "default": "salesCount",
            "enum": ["name", "salesCount", "commissions", "clicksRaw"]
        },
        "orderAsc": {
            "type": "boolean",
            "default": false
        },
        "limit": {
            "type": "integer",
            "default": 5
        },
        "rowTemplate": {
            "type": "string",
            "default": "{$firstname} {$lastname} ({$userid}): clicks: {$clicksRaw}; sales: {$salesCount}; commissions: {$commissions} [parent: {$parentuserid}]"
        }
    },
    "supports": {
        "html": false,
        "align": ["wide", "full"],
        "spacing": {
            "margin": true,
            "padding": true
        },
        "typography": {
            "fontSize": true,
            "lineHeight": true
        },
        "color": {
            "background": true,
            "text": true
        }
    },
    "editorScript": "postaffiliatepro-top-affiliates-editor",
    "editorStyle":  "postaffiliatepro-top-affiliates-editor-style",
    "style":        "postaffiliatepro-top-affiliates-style",
    "render":       "file:./src/render.php",
    "example": {
        "attributes": {
            "title": "Top Affiliates",
            "limit": 5,
            "orderBy": "salesCount"
        }
    }
}