{
  "apiVersion": 3,
  "name": "wpuf-ud/files",
  "title": "User Files",
  "category": "wpuf-ud",
  "description": "Display user files from custom meta fields with file preview and download options.",
  "keywords": [ "user", "files", "meta", "download", "wpuf" ],
  "textdomain": "wpuf-pro",
  "usesContext": [ "wpuf-ud/userObject" ],
  "attributes": {
    "metaFieldKey": {
      "type": "string",
      "default": ""
    },
    "fieldLabel": {
      "type": "string",
      "default": ""
    },
    "showLabel": {
      "type": "boolean",
      "default": true
    },
    "profileUserRoles": {
      "type": "array",
      "default": ["all"]
    },
    "viewerRoles": {
      "type": "array",
      "default": ["all"]
    }
  },
  "supports": {
    "html": false,
    "spacing": {
      "margin": true,
      "padding": true
    },
    "__experimentalBorder": {
      "color": true,
      "radius": true,
      "style": true,
      "width": true
    }
  },
  "example": {
    "viewportWidth": 800,
    "attributes": {
      "metaFieldKey": "user_files",
      "fieldLabel": "User Files",
      "showLabel": true,
      "profileUserRoles": ["all"],
      "viewerRoles": ["all"]
    },
            "innerBlocks": [
          {
            "name": "core/group",
            "attributes": {
              "className": "wpuf-files-content"
            },
            "innerBlocks": [
              {
                "name": "core/heading",
                "attributes": {
                  "level": 3,
                  "content": "User Files"
                }
              },
              {
                "name": "core/group",
                "attributes": {
                  "className": "files-grid !wpuf-grid !wpuf-grid-cols-2 sm:!wpuf-grid-cols-3 md:!wpuf-grid-cols-4 !wpuf-gap-3"
                },
                "innerBlocks": [
                  {
                    "name": "core/group",
                    "attributes": {
                      "className": "file-item !wpuf-relative !wpuf-group"
                    },
                    "innerBlocks": [
                      {
                        "name": "core/group",
                        "attributes": {
                          "className": "file-preview !wpuf-w-full !wpuf-h-28 !wpuf-bg-gray-700 !wpuf-rounded-lg !wpuf-flex !wpuf-flex-col !wpuf-items-center !wpuf-justify-center !wpuf-text-white !wpuf-font-bold !wpuf-text-sm"
                        }
                      },
                      {
                        "name": "core/paragraph",
                        "attributes": {
                          "content": "document.pdf",
                          "className": "file-name !wpuf-text-xs !wpuf-text-gray-700 !wpuf-text-center !wpuf-truncate !wpuf-font-medium"
                        }
                      }
                    ]
                  },
                  {
                    "name": "core/group",
                    "attributes": {
                      "className": "file-item !wpuf-relative !wpuf-group"
                    },
                    "innerBlocks": [
                      {
                        "name": "core/group",
                        "attributes": {
                          "className": "file-preview !wpuf-w-full !wpuf-h-28 !wpuf-bg-gray-700 !wpuf-rounded-lg !wpuf-flex !wpuf-flex-col !wpuf-items-center !wpuf-justify-center !wpuf-text-white !wpuf-font-bold !wpuf-text-sm"
                        }
                      },
                      {
                        "name": "core/paragraph",
                        "attributes": {
                          "content": "presentation.pptx",
                          "className": "file-name !wpuf-text-xs !wpuf-text-gray-700 !wpuf-text-center !wpuf-truncate !wpuf-font-medium"
                        }
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
  }
}
