{
  "name": "split-menu-button",
  "version": "20.0.2",
  "jetVersion": "^20.0.2",
  "pack": "oj-c",
  "type": "composite",
  "dependencyScope": "runtime",
  "license": "https://opensource.org/licenses/UPL",
  "implements": [
    "CSplitMenuButtonElement"
  ],
  "description": "A Split Menu Button combines a push button and menu button.",
  "displayName": "Split Menu Button",
  "help": "oj-c.SplitMenuButton.html",
  "main": "oj-c/split-menu-button",
  "status": [
    {
      "type": "production",
      "since": "17.0.0"
    }
  ],
  "extension": {
    "catalog": {
      "category": "Controls"
    },
    "vbdt": {
      "module": "oj-c/split-menu-button"
    },
    "oracle": {
      "icon": "oj-ux-ico-menu-button",
      "uxSpecs": [
        "menu-button"
      ]
    },
    "webelement": {
      "package": "@oracle/oraclejet-core-pack",
      "version": "20.0.2",
      "docUrl": "https://www.oracle.com/webfolder/technetwork/jet/cpwdtsdoc/classes/SplitMenuButtonWebElement.html",
      "export": "findSplitMenuButton",
      "main": "@oracle/oraclejet-core-pack/webdriver"
    }
  },
  "propertyLayout": [
    {
      "propertyGroup": "common",
      "items": [
        "label",
        "tooltip",
        "display",
        "chroming",
        "size",
        "width",
        "disabled"
      ]
    },
    {
      "propertyGroup": "data",
      "items": [
        "items"
      ]
    }
  ],
  "since": "14.0.0",
  "requirements": [
    {
      "type": "anyOf",
      "label": "accessibility",
      "properties": [
        "label"
      ]
    },
    {
      "type": "not",
      "label": "accessibility",
      "properties": [
        "aria-label"
      ]
    }
  ],
  "properties": {
    "label": {
      "type": "string",
      "description": "Text to show in the button.",
      "displayName": "label",
      "help": "#label",
      "required": true,
      "translatable": true
    },
    "items": {
      "type": "Array<object>",
      "description": "Items describe the menu items rendered by the menu button.",
      "help": "#items",
      "extension": {
        "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 menu item.",
              "type": "string",
              "status": [
                {
                  "type": "deprecated",
                  "target": "propertyValue",
                  "since": "17.0.0",
                  "value": [
                    "divider"
                  ],
                  "description": "Use 'separator' instead."
                }
              ],
              "enumValues": [
                "item",
                "separator",
                "divider"
              ],
              "propertyEditorValues": {
                "item": {
                  "description": "A selectable menu item that triggers an action."
                },
                "separator": {
                  "description": "A non-selectable menu item that visibly separates menu items (no other properties apply)."
                },
                "divider": {
                  "description": "A divider that visibly separates menu items (deprecated)."
                }
              }
            },
            "label": {
              "description": "Specifies the text to show for the menu item.",
              "type": "string",
              "required": true,
              "translatable": true
            },
            "key": {
              "description": "Specifes a key value associated with the menu item.",
              "type": "string"
            },
            "disabled": {
              "description": "Specifies whether the menu item should be disabled.",
              "type": "boolean"
            },
            "onAction": {
              "description": "A callback function invoked when the menu item is selected.",
              "type": "function"
            },
            "startIcon": {
              "description": "Specifies an icon to show at the start position of the menu item.",
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enumValues": [
                    "class",
                    "img"
                  ]
                },
                "class": {
                  "type": "string"
                },
                "src": {
                  "type": "string"
                }
              }
            },
            "endIcon": {
              "description": "Specifies an icon to show at the end position of the menu item.",
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enumValues": [
                    "class",
                    "img"
                  ]
                },
                "class": {
                  "type": "string"
                },
                "src": {
                  "type": "string"
                }
              }
            },
            "variant": {
              "description": "Specifies styling for the menu item based upon its associated action.",
              "type": "string",
              "enumValues": [
                "standard",
                "destructive"
              ],
              "propertyEditorValues": {
                "standard": {
                  "description": "Styling for a standard menu item"
                },
                "destructive": {
                  "description": "Styling for a menu item associated with a non-reversible action"
                }
              }
            }
          }
        }
      },
      "value": []
    },
    "tooltip": {
      "type": "string",
      "description": "Text to show in the tooltip.",
      "help": "#tooltip",
      "translatable": true
    },
    "disabled": {
      "type": "boolean",
      "description": "Specifies that the button element should be disabled.",
      "help": "#disabled",
      "value": false
    },
    "size": {
      "type": "string",
      "description": "Size of button",
      "help": "#size",
      "propertyEditorValues": {
        "sm": {
          "description": "Display a small button.",
          "displayName": "Small"
        },
        "md": {
          "description": "Display a default size button.",
          "displayName": "Medium"
        },
        "lg": {
          "description": "Display a large button.",
          "displayName": "Large"
        }
      },
      "enumValues": [
        "sm",
        "md",
        "lg"
      ],
      "value": "md"
    },
    "width": {
      "type": "number|string",
      "description": "Specifies that the button style width",
      "help": "#width"
    },
    "chroming": {
      "type": "string",
      "description": "Indicates in what states the button has chromings in background and border.",
      "help": "#chroming",
      "propertyEditorValues": {
        "outlined": {
          "description": "Outlined buttons are salient, but lighter weight than solid buttons. Outlined buttons are useful for secondary actions.",
          "displayName": "Outlined"
        },
        "solid": {
          "description": "Solid buttons stand out, and direct the user's attention to the most important actions in the UI.",
          "displayName": "Solid"
        },
        "callToAction": {
          "description": "A Call To Action (CTA) button guides the user to take or complete the action that is the main goal of the page or page section. There should only be one CTA button on a page at any given time.",
          "displayName": "Call To Action"
        }
      },
      "enumValues": [
        "solid",
        "outlined",
        "callToAction"
      ],
      "binding": {
        "consume": {
          "name": "containerChroming"
        }
      },
      "value": "outlined"
    }
  },
  "events": {
    "ojMenuAction": {
      "bubbles": true,
      "description": "Triggered when a menu item is clicked, whether by keyboard, mouse, or touch events. Detail indicates which menu item was clicked.",
      "eventGroup": "common",
      "help": "#event:ojMenuAction",
      "detail": {
        "key": {
          "type": "string"
        }
      }
    },
    "ojAction": {
      "bubbles": true,
      "description": "Triggered when a button is clicked, whether by keyboard, mouse, or touch events. To meet accessibility requirements, the only supported way to react to the click of a button is to listen for this event.",
      "eventGroup": "common",
      "help": "#event:action"
    }
  },
  "methods": {
    "focus": {
      "return": "void"
    },
    "blur": {
      "return": "void"
    },
    "click": {
      "return": "void"
    },
    "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"
    }
  }
}