{
  "panels": {
    "display": {
      "panel_label": "Display Options",
      "initial_open": true,
      "fields": {
        "directory_layout": {
          "name": "directory_layout",
          "type": "string",
          "default": "roundGrids",
          "label": "Select User Listing Layout",
          "control": "select",
          "options_source": "directory_layouts",
          "group": "display",
          "target_blocks": ["user-directory"]
        },
        "profile_layout": {
          "name": "profile_layout",
          "type": "string",
          "default": "layout-1",
          "label": "Profile Layout Style",
          "control": "select",
          "options_source": "profile_layouts",
          "group": "display",
          "target_blocks": ["user-profile"]
        },
        "roles": {
          "name": "roles",
          "control": "multiselect",
          "default": "all",
          "options_source": "roles",
          "all_option": true,
          "group": "display",
          "label": "User Roles",
          "description": "Select which user roles to include.",
          "target_blocks": ["user-directory"]
        },
        "max_item": {
          "name": "max_item",
          "type": "number",
          "control": "number",
          "default": -1,
          "label": "Max No. of Profiles",
          "group": "display",
          "target_blocks": ["user-directory"]
        },
        "max_item_per_page": {
          "name": "max_item_per_page",
          "type": "number",
          "control": "number",
          "default": 10,
          "label": "Max Profiles Per Page",
          "group": "display",
          "target_blocks": ["user-directory"]
        },
        "orderby": {
          "name": "orderby",
          "type": "string",
          "control": "select",
          "default": "id",
          "label": "Sort Users By",
          "options": [
            { "value": "id", "label": "User ID" },
            { "value": "user_login", "label": "Username" },
            { "value": "user_email", "label": "Email" },
            { "value": "display_name", "label": "Display Name" },
            { "value": "user_registered", "label": "Registration Date" }
          ],
          "group": "display",
          "target_blocks": ["user-directory"]
        },
        "order": {
          "name": "order",
          "type": "string",
          "control": "select",
          "default": "desc",
          "label": "Sort Order",
          "options": [
            { "value": "asc", "label": "Ascending (A-Z)" },
            { "value": "desc", "label": "Descending (Z-A)" }
          ],
          "group": "display",
          "target_blocks": ["user-directory"]
        },
        "profile_page_url": {
          "name": "profile_page_url",
          "type": "string",
          "default": "",
          "label": "Profile Page URL",
          "control": "text",
          "placeholder": "Leave empty to use /user-profile/",
          "description": "URL of the page containing the User Profile block (e.g., /user-profile/, /member-directory/)",
          "group": "advanced",
          "target_blocks": ["user-directory"]
        }
      }
    },
    "profile_display": {
      "panel_label": "Profile Display",
      "initial_open": true,
      "target_blocks": ["user-profile"],
      "fields": {
        "show_avatar": {
          "name": "show_avatar",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Show Profile Picture",
          "group": "profile_display"
        },
        "show_username": {
          "name": "show_username",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Show Username",
          "group": "profile_display"
        },
        "show_phone": {
          "name": "show_phone",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Show Phone",
          "group": "profile_display"
        },
        "show_email": {
          "name": "show_email",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Show Email",
          "group": "profile_display"
        },
        "show_website": {
          "name": "show_website",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Show Website",
          "group": "profile_display"
        },
        "show_user_bio": {
          "name": "show_user_bio",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Show User Bio",
          "group": "profile_display"
        },
        "profile_fields": {
          "name": "profile_fields",
          "type": "array",
          "control": "multiselect",
          "sortable": true,
          "default": ["user_login", "display_name", "user_email"],
          "options_source": "profile_fields",
          "label": "Profile Fields to Display",
          "description": "Select which profile fields to show",
          "group": "profile_display"
        },
        "custom_fields": {
          "name": "custom_fields",
          "type": "array",
          "control": "multiselect",
          "sortable": true,
          "default": [],
          "options_source": "user_meta_fields",
          "label": "Custom Meta Fields",
          "description": "Select custom user meta fields to display",
          "group": "profile_display"
        }
      }
    },
    "profile_tabs": {
      "panel_label": "Profile Tabs",
      "initial_open": false,
      "target_blocks": ["user-profile"],
      "fields": {
        "enable_tabs": {
          "name": "enable_tabs",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Enable Profile Tabs",
          "group": "profile_tabs"
        },
        "default_tabs": {
          "name": "default_tabs",
          "type": "array",
          "control": "multiselect",
          "sortable": true,
          "default": ["about", "comments", "posts"],
          "options_source": "profile_tabs",
          "label": "Available Tabs",
          "description": "Select and order the tabs to display",
          "group": "profile_tabs"
        },
        "default_active_tab": {
          "name": "default_active_tab",
          "type": "string",
          "default": "about",
          "label": "Default Active Tab",
          "control": "select",
          "options_source": "profile_tabs",
          "group": "profile_tabs"
        },
        "posts_per_tab": {
          "name": "posts_per_tab",
          "type": "number",
          "control": "number",
          "default": 5,
          "label": "Posts Per Tab",
          "description": "Number of posts/comments to show per tab",
          "group": "profile_tabs"
        }
      }
    },
    "search": {
      "panel_label": "Search & Filter Options",
      "initial_open": false,
      "target_blocks": ["user-directory"],
      "fields": {
        "enable_search": {
          "name": "enable_search",
          "type": "boolean",
          "control": "toggle",
          "default": true,
          "label": "Enable Search Bar",
          "group": "search"
        },
        "search_placeholder": {
          "name": "search_placeholder",
          "type": "text",
          "default": "Search Users",
          "label": "Search Placeholder Text",
          "group": "search"
        },
        "searchable_fields": {
          "name": "searchable_fields",
          "type": "array",
          "control": "multiselect",
          "default": [
            "user_login",
            "user_email",
            "display_name"
          ],
          "options_source": "searchable_fields",
          "label": "Searchable Fields",
          "group": "search"
        }
      }
    },
    "advanced": {
      "panel_label": "Advanced Options",
      "initial_open": false,
      "fields": {
        "exclude_users": {
          "name": "exclude_users",
          "type": "array",
          "control": "multiselect",
          "default": [],
          "options_source": "users",
          "label": "Exclude Specific Users",
          "group": "advanced",
          "target_blocks": ["user-directory"]
        },
        "columns": {
          "name": "columns",
          "type": "array",
          "control": "multiselect",
          "sortable": true,
          "default": [
            "user_login",
            "display_name"
          ],
          "options_source": "columns",
          "label": "Display Fields in List",
          "group": "advanced",
          "target_blocks": ["user-directory"]
        },
        "avatar_size": {
          "name": "avatar_size",
          "type": "string",
          "default": "thumbnail",
          "label": "Profile Pictures Size",
          "control": "select",
          "options_source": "avatar_sizes",
          "group": "advanced"
        }
      }
    }
  }
}
