import { newComponentActions } from '@dvn/alaca/components/dvn-rich-editor/constants';
import { Component, h, Host, Prop, State } from '@stencil/core';
export class DvnRichEditorComponentOptions {
  constructor() {
    this.isMenuExpanded = false;
  }
  render() {
    return (h(Host, { style: { zIndex: this.isMenuExpanded ? '100' : undefined } },
      h("dvn-dropdown", { placement: "rightTop", trigger: "click", leaned: true, onExpandChange: (expanded) => this.isMenuExpanded = expanded },
        h("dvn-icon-button", { iconName: "uil-plus", view: "flat", scale: "small" }),
        h("div", { slot: "content" },
          h("dvn-menu", { leaned: true, width: "200px" }, newComponentActions.map(action => (h("dvn-menu-item", { onClick: () => this.onActionClick(action.name, this.index) },
            h("dvn-info-summary", { title: action.title, leaned: true }, action.icon &&
              h("dvn-icon", { slot: "media", iconName: `uil ${action.icon}`, scale: action.iconSize }))))))))));
  }
  static get is() { return "dvn-rich-editor-new-component-options"; }
  static get originalStyleUrls() { return {
    "$": ["./dvn-rich-editor-new-component-options.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["dvn-rich-editor-new-component-options.css"]
  }; }
  static get properties() { return {
    "onActionClick": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "(action: ComponentType, index: number) => void",
        "resolved": "(action: ComponentType, index: number) => void",
        "references": {
          "ComponentType": {
            "location": "import",
            "path": "@dvn/alaca/components/dvn-rich-editor/constants"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "index": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "index",
      "reflect": false
    }
  }; }
  static get states() { return {
    "isMenuExpanded": {}
  }; }
}
