{
  "name": "toolbar",
  "version": "20.0.2",
  "jetVersion": "^20.0.2",
  "pack": "oj-c",
  "type": "composite",
  "dependencyScope": "runtime",
  "license": "https://opensource.org/licenses/UPL",
  "implements": [
    "CToolbarElement"
  ],
  "description": "A toolbar displays a strip of control elements such as buttons and menu buttons, often grouped by separators.",
  "displayName": "Toolbar",
  "help": "oj-c.Toolbar.html",
  "main": "oj-c/toolbar",
  "since": "18.0.0",
  "status": [
    {
      "type": "supersedes",
      "since": "18.0.0",
      "value": [
        "oj-toolbar"
      ]
    }
  ],
  "extension": {
    "catalog": {
      "category": "Controls"
    },
    "vbdt": {
      "module": "oj-c/toolbar"
    },
    "oracle": {
      "icon": "oj-ux-ico-toolbar",
      "uxSpecs": [
        "toolbar"
      ]
    },
    "webelement": {
      "package": "@oracle/oraclejet-core-pack",
      "version": "20.0.2",
      "docUrl": "https://www.oracle.com/webfolder/technetwork/jet/cpwdtsdoc/classes/ToolbarWebElement.html",
      "export": "findToolbar",
      "main": "@oracle/oraclejet-core-pack/webdriver"
    }
  },
  "properties": {
    "spacing": {
      "type": "string",
      "description": "Specifies the spacing between content. 'sm' spacing is recommended for button variants that don't have a background or border, for example borderless buttons. 'lg' spacing is recommended for button variants that have a background or border, for example outlined or solid buttons.",
      "displayName": "spacing",
      "help": "#spacing",
      "propertyEditorValues": {
        "sm": {
          "description": "Compact spacing between content.",
          "displayName": "Small"
        },
        "lg": {
          "description": "Default spacing between content.",
          "displayName": "Large"
        }
      },
      "enumValues": [
        "sm",
        "lg"
      ]
    },
    "chroming": {
      "type": "string",
      "description": "Specifies the chroming to be set on content to be placed into the toolbar.",
      "displayName": "chroming",
      "help": "#chroming",
      "enumValues": [
        "borderless",
        "outlined"
      ]
    },
    "size": {
      "type": "string",
      "description": "Specifies the size of content to be placed into the toolbar.",
      "displayName": "size",
      "help": "#size",
      "enumValues": [
        "sm",
        "md",
        "lg"
      ]
    },
    "items": {
      "type": "Array<object>",
      "description": "Specifies the content to be placed into the toolbar.",
      "displayName": "items",
      "help": "#items",
      "extension": {
        "webelement": {
          "exceptionStatus": [
            {
              "type": "unsupported",
              "since": "18.0.5",
              "description": "Stop 'items' property test adapter generation based upon metadata, and instead use override to freeze the API."
            }
          ]
        },
        "vbdt": {
          "pi": {
            "events": {
              "suggestions": [
                {
                  "type": "component",
                  "name": "ojMenuAction",
                  "mappings": [
                    {
                      "variableName": "menuItemKey",
                      "expression": "{{$event.detail.key}}",
                      "type": "string"
                    }
                  ]
                }
              ]
            }
          },
          "itemProperties": {
            "type": {
              "description": "Specifies the type of the toolbar item.",
              "type": "string",
              "required": true,
              "enumValues": [
                "button",
                "menu-button",
                "split-menu-button",
                "buttonset-single",
                "buttonset-multiple",
                "toggle-button",
                "progress-button",
                "separator"
              ],
              "propertyEditorValues": {
                "button": {
                  "displayName": "Button"
                },
                "menu-button": {
                  "displayName": "Menu Button"
                },
                "split-menu-button": {
                  "displayName": "Split Menu Button"
                },
                "buttonset-single": {
                  "displayName": "Buttonset Single"
                },
                "buttonset-multiple": {
                  "displayName": "Buttonset Multiple"
                },
                "toggle-button": {
                  "displayName": "Toggle Button"
                },
                "progress-button": {
                  "displayName": "Progress Button"
                },
                "separator": {
                  "displayName": "Separator"
                }
              }
            },
            "chroming": {
              "description": "Indicates in what states the item has variants in background and border.",
              "type": "string",
              "enumValues": [
                "solid",
                "borderless",
                "outlined",
                "ghost",
                "callToAction",
                "danger"
              ],
              "propertyEditorValues": {
                "solid": {
                  "description": "Valid for Button, Menu Button, Split Menu Button, and Progress Button items."
                },
                "borderless": {
                  "description": "Valid for Button, Menu Button, Buttonset, Toggle Button, and Progress Button items."
                },
                "outlined": {
                  "description": "Valid for Button, Menu Button, Split Menu Button, Buttonset, Toggle Button, and Progress Button items."
                },
                "ghost": {
                  "description": "Valid for Button and Menu Button items."
                },
                "callToAction": {
                  "description": "Valid for Button, Split Menu Button, and Progress Button items."
                },
                "danger": {
                  "description": "Valid for Button items."
                }
              }
            },
            "disabled": {
              "description": "Specifies whether the item should be disabled.",
              "type": "boolean"
            },
            "display": {
              "description": "Display just the labels, the icons, or all (not supported for Split Menu Button items).",
              "type": "string",
              "enumValues": [
                "all",
                "labels",
                "icons"
              ]
            },
            "endIcon": {
              "description": "Optional icon to show at the end position of an item (not supported for Split Menu Button nor Buttonset items).",
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enumValues": [
                    "class",
                    "img"
                  ]
                },
                "class": {
                  "type": "string"
                },
                "src": {
                  "type": "string"
                }
              }
            },
            "isLoading": {
              "description": "Specifies if progress should be shown (only valid for Progress Button items).",
              "type": "boolean"
            },
            "items": {
              "description": "Specifies the content for Menu Button, Split Menu Button, and Buttonset items. See the Help documentation for more information.",
              "type": "Array<object>",
              "properties": {
                "disabled": {
                  "description": "Specifies if the menu item or buttonset toggle item is disabled.",
                  "type": "boolean"
                },
                "endIcon": {
                  "description": "Optional icon to show at the end position of a top-level menu item or of a buttonset toggle item (not supported for submenu items).",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enumValues": [
                        "class",
                        "img"
                      ]
                    },
                    "class": {
                      "type": "string"
                    },
                    "src": {
                      "type": "string"
                    }
                  }
                },
                "items": {
                  "description": "Specifies submenu or select menu content. See the Help documentation for more information.",
                  "type": "Array<object>"
                },
                "key": {
                  "description": "A unique key associated with the menu item.",
                  "type": "string"
                },
                "label": {
                  "description": "Text to show in the menu item or the buttonset toggle item.",
                  "type": "string",
                  "translatable": true
                },
                "onAction": {
                  "description": "An optional callback function associated with a top-level menu item (not supported for submenu items).",
                  "type": "function"
                },
                "startIcon": {
                  "description": "Optional icon to show at the start position of a top-level menu item or a buttonset toggle item (not supported for submenu items).",
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enumValues": [
                        "class",
                        "img"
                      ]
                    },
                    "class": {
                      "type": "string"
                    },
                    "src": {
                      "type": "string"
                    }
                  }
                },
                "type": {
                  "description": "Specifies the type of the menu item (not supported for buttonset toggle items).",
                  "type": "string",
                  "enumValues": [
                    "item",
                    "submenu",
                    "selectsingle",
                    "selectmultiple",
                    "separator"
                  ]
                },
                "value": {
                  "description": "The value associated with a buttonset toggle item (not supported for menu items).",
                  "type": "string"
                },
                "variant": {
                  "description": "Specifies the behavior of a top-level menu item (not supported for submenu items nor buttonset toggle items).",
                  "type": "string",
                  "enumValues": [
                    "standard",
                    "destructive"
                  ]
                }
              }
            },
            "key": {
              "description": "A unique key associated with the item (not supported for Menu Button items, and required for all other items).",
              "type": "string"
            },
            "label": {
              "description": "Text to show in the item (not supported for Buttonset items, and required for all other items).",
              "type": "string",
              "translatable": true
            },
            "onAction": {
              "description": "A callback function associated with the item (only valid for Button, Split Menu Button, and Progress Button items).",
              "type": "function"
            },
            "startIcon": {
              "description": "Optional icon to show at the start position of an item (not supported for Split Menu Button nor Buttonset items).",
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enumValues": [
                    "class",
                    "img"
                  ]
                },
                "class": {
                  "type": "string"
                },
                "src": {
                  "type": "string"
                }
              }
            },
            "suffix": {
              "description": "Optional suffix appended to menu label to indicate last selection (only valid for Menu Button items).",
              "type": "string",
              "translatable": true
            },
            "tooltip": {
              "description": "Optional override text for the default tooltip that renders the label when in icon mode (not supported for Buttonset items).",
              "type": "string",
              "translatable": true
            }
          }
        }
      },
      "value": []
    },
    "toolbarSelection": {
      "type": "object",
      "description": "An array containing key/value objects for selection groups.",
      "displayName": "toolbarSelection",
      "help": "#toolbarSelection",
      "extension": {
        "vbdt": {
          "keyedProperties": {
            "keys": {
              "type": "string"
            },
            "values": {
              "type": "string|boolean|Array<string>|object"
            }
          }
        }
      },
      "writeback": true,
      "value": {}
    }
  },
  "events": {
    "ojToolbarAction": {
      "bubbles": true,
      "description": "Triggered when a toolbar item is clicked, whether by keyboard, mouse, or touch events. Detail indicates which toolbar item was clicked.",
      "eventGroup": "common",
      "help": "#event:ojToolbarAction",
      "detail": {
        "key": {
          "type": "string"
        }
      }
    },
    "ojToolbarSelection": {
      "bubbles": true,
      "description": "Triggered when a toolbar selection group item is clicked, whether by keyboard, mouse, or touch events. Detail indicates new selection value for group.",
      "eventGroup": "common",
      "help": "#event:ojToolbarSelection",
      "detail": {
        "value": {
          "type": "string|boolean|Array<string>|object"
        },
        "toolbarSelectionGroupKey": {
          "type": "string"
        }
      }
    }
  },
  "methods": {
    "setProperty": {
      "description": "Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a corresponding event.",
      "help": "#setProperty",
      "params": [
        {
          "name": "property",
          "description": "The property name to set. Supports dot notation for subproperty access.",
          "type": "string"
        },
        {
          "name": "value",
          "description": "The new value to set the property to.",
          "type": "any"
        }
      ],
      "return": "void"
    },
    "getProperty": {
      "description": "Retrieves the value of a property or a subproperty.",
      "help": "#getProperty",
      "params": [
        {
          "name": "property",
          "description": "The property name to get. Supports dot notation for subproperty access.",
          "type": "string"
        }
      ],
      "return": "any"
    },
    "setProperties": {
      "description": "Performs a batch set of properties.",
      "help": "#setProperties",
      "params": [
        {
          "name": "properties",
          "description": "An object containing the property and value pairs to set.",
          "type": "object"
        }
      ],
      "return": "void"
    }
  }
}