import { OjWebElement } from '../';

/**
 * This is the base class for oj-diagram WebElement, and is generated from the
 * component's metadata. Do not modify these contents since they'll be replaced
 * during the next generation.
 * Put overrides into the WebElements's subclass, OjDiagram.ts.
 */
export class OjDiagramBase extends OjWebElement {
  /**
   * Gets the value of <code>animationOnDataChange</code> property.
   * Specifies the animation that is applied on data changes.
   * @return The value of <code>animationOnDataChange</code> property.
   *
   */
  public getAnimationOnDataChange(): Promise<string> {
    return this.getProperty<string>('animationOnDataChange');
  }

  /**
   * Gets the value of <code>animationOnDisplay</code> property.
   * Specifies the animation that is shown on initial display.
   * @return The value of <code>animationOnDisplay</code> property.
   *
   */
  public getAnimationOnDisplay(): Promise<string> {
    return this.getProperty<string>('animationOnDisplay');
  }

  /**
   * Gets the value of <code>as</code> property.
   * An alias for the '$current' context variable passed to slot content for the nodeTemplate or linkTemplate slots.
   * @return The value of <code>as</code> property.
   * @deprecated Since 6.2.0. Set the alias directly on the template element using the data-oj-as attribute instead.
   */
  public getAs(): Promise<string> {
    return this.getProperty<string>('as');
  }

  /**
   * Sets the value of <code>currentItem</code> property.
   * Specifies the node or link that should receive focus.
   * @param currentItem The value to set for <code>currentItem</code>
   *
   */
  public changeCurrentItem(currentItem: any): Promise<void> {
    return this.setProperty<any>('currentItem', currentItem);
  }

  /**
   * Gets the value of <code>currentItem</code> property.
   * Specifies the node or link that should receive focus.
   * @return The value of <code>currentItem</code> property.
   *
   */
  public getCurrentItem(): Promise<any> {
    return this.getProperty<any>('currentItem');
  }

  /**
   * Gets the value of <code>dnd</code> property.
   * Used to customize the drag and drop features.
   * @return The value of <code>dnd</code> property.
   *
   */
  public getDnd(): Promise<Dnd> {
    return this.getProperty<Dnd>('dnd');
  }

  /**
   * Gets the value of <code>focusRenderer</code> property.
   * Specifies custom renderer for the diagram nodes used for focus updates.
   * @return The value of <code>focusRenderer</code> property.
   * @deprecated Since 8.0.0. Use nodeContent.focusRenderer instead.
   */
  public getFocusRenderer(): Promise<null | null> {
    return this.getProperty<null | null>('focusRenderer');
  }

  /**
   * Sets the value of <code>hiddenCategories</code> property.
   * Specifies categories used for filtering.
   * @param hiddenCategories The value to set for <code>hiddenCategories</code>
   *
   */
  public changeHiddenCategories(hiddenCategories: Array<string>): Promise<void> {
    return this.setProperty<Array<string>>('hiddenCategories', hiddenCategories);
  }

  /**
   * Gets the value of <code>hiddenCategories</code> property.
   * Specifies categories used for filtering.
   * @return The value of <code>hiddenCategories</code> property.
   *
   */
  public getHiddenCategories(): Promise<Array<string>> {
    return this.getProperty<Array<string>>('hiddenCategories');
  }

  /**
   * Gets the value of <code>highlightMatch</code> property.
   * Specifies matching condition used for category highlighting.
   * @return The value of <code>highlightMatch</code> property.
   *
   */
  public getHighlightMatch(): Promise<string> {
    return this.getProperty<string>('highlightMatch');
  }

  /**
   * Sets the value of <code>highlightedCategories</code> property.
   * Specifies categories used for highlighting.
   * @param highlightedCategories The value to set for <code>highlightedCategories</code>
   *
   */
  public changeHighlightedCategories(highlightedCategories: Array<string>): Promise<void> {
    return this.setProperty<Array<string>>('highlightedCategories', highlightedCategories);
  }

  /**
   * Gets the value of <code>highlightedCategories</code> property.
   * Specifies categories used for highlighting.
   * @return The value of <code>highlightedCategories</code> property.
   *
   */
  public getHighlightedCategories(): Promise<Array<string>> {
    return this.getProperty<Array<string>>('highlightedCategories');
  }

  /**
   * Gets the value of <code>hoverBehavior</code> property.
   * Defines the behavior applied when hovering over diagram nodes and links.
   * @return The value of <code>hoverBehavior</code> property.
   *
   */
  public getHoverBehavior(): Promise<string> {
    return this.getProperty<string>('hoverBehavior');
  }

  /**
   * Gets the value of <code>hoverRenderer</code> property.
   * Specifies custom renderer for the diagram nodes used for hover updates.
   * @return The value of <code>hoverRenderer</code> property.
   * @deprecated Since 8.0.0. Use nodeContent.hoverRenderer instead.
   */
  public getHoverRenderer(): Promise<null | null> {
    return this.getProperty<null | null>('hoverRenderer');
  }

  /**
   * Gets the value of <code>layout</code> property.
   * Specifies layout callback used to position nodes and links.
   * @return The value of <code>layout</code> property.
   *
   */
  public getLayout(): Promise<null> {
    return this.getProperty<null>('layout');
  }

  /**
   * Gets the value of <code>linkContent</code> property.
   * An object containing an optional callbacks function for link customization.
   * @return The value of <code>linkContent</code> property.
   *
   */
  public getLinkContent(): Promise<LinkContent> {
    return this.getProperty<LinkContent>('linkContent');
  }

  /**
   * Gets the value of <code>linkHighlightMode</code> property.
   * Defines link highlighting mode.
   * @return The value of <code>linkHighlightMode</code> property.
   *
   */
  public getLinkHighlightMode(): Promise<string> {
    return this.getProperty<string>('linkHighlightMode');
  }

  /**
   * Gets the value of <code>linkProperties</code> property.
   * Optional callback for customizing link appearance based on link data.
   * @return The value of <code>linkProperties</code> property.
   * @deprecated Since 6.0.0. See nodeData and linkData usage.
   */
  public getLinkProperties(): Promise<null | null> {
    return this.getProperty<null | null>('linkProperties');
  }

  /**
   * Gets the value of <code>maxZoom</code> property.
   * Specifies the maximum zoom level for this diagram.
   * @return The value of <code>maxZoom</code> property.
   *
   */
  public getMaxZoom(): Promise<number> {
    return this.getProperty<number>('maxZoom');
  }

  /**
   * Gets the value of <code>minZoom</code> property.
   * Specifies the minimum zoom level for this diagram.
   * @return The value of <code>minZoom</code> property.
   *
   */
  public getMinZoom(): Promise<number> {
    return this.getProperty<number>('minZoom');
  }

  /**
   * Gets the value of <code>nodeContent</code> property.
   * An object containing an optional callbacks function for node customization.
   * @return The value of <code>nodeContent</code> property.
   *
   */
  public getNodeContent(): Promise<NodeContent> {
    return this.getProperty<NodeContent>('nodeContent');
  }

  /**
   * Gets the value of <code>nodeHighlightMode</code> property.
   * Defines node highlighting mode.
   * @return The value of <code>nodeHighlightMode</code> property.
   *
   */
  public getNodeHighlightMode(): Promise<string> {
    return this.getProperty<string>('nodeHighlightMode');
  }

  /**
   * Gets the value of <code>nodeProperties</code> property.
   * Optional callback for customizing node appearance based on node data.
   * @return The value of <code>nodeProperties</code> property.
   * @deprecated Since 6.0.0. See nodeData and linkData usage.
   */
  public getNodeProperties(): Promise<null | null> {
    return this.getProperty<null | null>('nodeProperties');
  }

  /**
   * Gets the value of <code>overview</code> property.
   * An object, used to define a diagram overview. If not specified, no overview will be shown.
   * @return The value of <code>overview</code> property.
   *
   */
  public getOverview(): Promise<Overview> {
    return this.getProperty<Overview>('overview');
  }

  /**
   * Gets the value of <code>panDirection</code> property.
   * Specifies if panning allowed in horizontal and vertical directions.
   * @return The value of <code>panDirection</code> property.
   *
   */
  public getPanDirection(): Promise<string> {
    return this.getProperty<string>('panDirection');
  }

  /**
   * Sets the value of <code>panZoomState</code> property.
   * A writeback object that contains properties zoom, centerX, and centerY that represent the panZoomState
   * @param panZoomState The value to set for <code>panZoomState</code>
   *
   */
  public changePanZoomState(panZoomState: PanZoomState): Promise<void> {
    return this.setProperty<PanZoomState>('panZoomState', panZoomState);
  }

  /**
   * Gets the value of <code>panZoomState</code> property.
   * A writeback object that contains properties zoom, centerX, and centerY that represent the panZoomState
   * @return The value of <code>panZoomState</code> property.
   *
   */
  public getPanZoomState(): Promise<PanZoomState> {
    return this.getProperty<PanZoomState>('panZoomState');
  }

  /**
   * Gets the value of <code>panning</code> property.
   * Specifies whether panning is allowed in Diagram.
   * @return The value of <code>panning</code> property.
   *
   */
  public getPanning(): Promise<string> {
    return this.getProperty<string>('panning');
  }

  /**
   * Gets the value of <code>promotedLinkBehavior</code> property.
   * Defines promoted link behavior for the component.
   * @return The value of <code>promotedLinkBehavior</code> property.
   *
   */
  public getPromotedLinkBehavior(): Promise<string> {
    return this.getProperty<string>('promotedLinkBehavior');
  }

  /**
   * Gets the value of <code>renderer</code> property.
   * Specifies custom renderer for the diagram nodes used for initial rendering.
   * @return The value of <code>renderer</code> property.
   * @deprecated Since 8.0.0. Use nodeContent.renderer instead.
   */
  public getRenderer(): Promise<null> {
    return this.getProperty<null>('renderer');
  }

  /**
   * Sets the value of <code>selection</code> property.
   * An array containing the ids of the selected nodes and links.
   * @param selection The value to set for <code>selection</code>
   *
   */
  public changeSelection(selection: Array<any>): Promise<void> {
    return this.setProperty<Array<any>>('selection', selection);
  }

  /**
   * Gets the value of <code>selection</code> property.
   * An array containing the ids of the selected nodes and links.
   * @return The value of <code>selection</code> property.
   *
   */
  public getSelection(): Promise<Array<any>> {
    return this.getProperty<Array<any>>('selection');
  }

  /**
   * Gets the value of <code>selectionMode</code> property.
   * Specifies the selection behavior on the diagram. See the Help documentation for more information.
   * @return The value of <code>selectionMode</code> property.
   *
   */
  public getSelectionMode(): Promise<string> {
    return this.getProperty<string>('selectionMode');
  }

  /**
   * Gets the value of <code>selectionRenderer</code> property.
   * Specifies custom renderer for the diagram nodes used for selection updates.
   * @return The value of <code>selectionRenderer</code> property.
   * @deprecated Since 8.0.0. Use nodeContent.selectionRenderer instead.
   */
  public getSelectionRenderer(): Promise<null | null> {
    return this.getProperty<null | null>('selectionRenderer');
  }

  /**
   * Gets the value of <code>styleDefaults</code> property.
   * An object defining the style defaults for this diagram.
   * @return The value of <code>styleDefaults</code> property.
   *
   */
  public getStyleDefaults(): Promise<StyleDefaults> {
    return this.getProperty<StyleDefaults>('styleDefaults');
  }

  /**
   * Gets the value of <code>tooltip</code> property.
   * An object containing an optional callback function for tooltip customization.
   * @return The value of <code>tooltip</code> property.
   *
   */
  public getTooltip(): Promise<Tooltip> {
    return this.getProperty<Tooltip>('tooltip');
  }

  /**
   * Gets the value of <code>touchResponse</code> property.
   * Specifies touch response behavior.
   * @return The value of <code>touchResponse</code> property.
   *
   */
  public getTouchResponse(): Promise<string> {
    return this.getProperty<string>('touchResponse');
  }

  /**
   * Gets the value of <code>trackResize</code> property.
   * Defines whether the element will automatically render in response to changes in size. See the Help documentation for more information.
   * @return The value of <code>trackResize</code> property.
   *
   */
  public getTrackResize(): Promise<string> {
    return this.getProperty<string>('trackResize');
  }

  /**
   * Gets the value of <code>translations</code> property.
   * A collection of translated resources from the translation bundle, or null if this component has no resources.
   * @return The value of <code>translations</code> property.
   *
   */
  public getTranslations(): Promise<Translations | null> {
    return this.getProperty<Translations | null>('translations');
  }

  /**
   * Gets the value of <code>zoomRenderer</code> property.
   * Specifies custom renderer for the diagram nodes used for zoom updates.
   * @return The value of <code>zoomRenderer</code> property.
   * @deprecated Since 8.0.0. Use nodeContent.zoomRenderer instead.
   */
  public getZoomRenderer(): Promise<null | null> {
    return this.getProperty<null | null>('zoomRenderer');
  }

  /**
   * Gets the value of <code>zooming</code> property.
   * Specifies whether zooming is allowed in Diagram.
   * @return The value of <code>zooming</code> property.
   *
   */
  public getZooming(): Promise<string> {
    return this.getProperty<string>('zooming');
  }
}
export interface Dnd {
  /**
   * Used to customize drag functionality.
   */
  drag: DndDrag;
  /**
   * An object that describes drop functionality.
   */
  drop: DndDrop;
}
export interface DndDrag {
  /**
   * Used to customize the drag features for nodes.
   */
  nodes: DndDragNodes;
  /**
   * Defines link creation functionality.
   */
  ports: DndDragPorts;
}
export interface DndDragNodes {
  /**
   * Specifies MIME type for dragged data.
   */
  dataTypes: string | Array<string>;
}
export interface DndDragPorts {
  /**
   * Specifies MIME type for dragged data.
   */
  dataTypes: string | Array<string>;
  /**
   * Specifies DOM element selector used to start link creation.
   */
  selector: string;
}
export interface DndDrop {
  /**
   * Allows dropping on the diagram background.
   */
  background: DndDropBackground;
  /**
   * Allows dropping on diagram links.
   */
  links: DndDropLinks;
  /**
   * Allows dropping on diagram nodes.
   */
  nodes: DndDropNodes;
  /**
   * Allows dropping a link end on a port.
   */
  ports: DndDropPorts;
}
export interface DndDropBackground {
  /**
   * Specifies MIME types of objects that can be dropped on the Diagram background.
   */
  dataTypes: string | Array<string>;
}
export interface DndDropLinks {
  /**
   * Specifies MIME types of objects that can be dropped on the Diagram links.
   */
  dataTypes: string | Array<string>;
}
export interface DndDropNodes {
  /**
   * Specifies MIME types of objects that can be dropped on the Diagram nodes.
   */
  dataTypes: string | Array<string>;
}
export interface DndDropPorts {
  /**
   * Specifies MIME types of objects that can be dropped on the Diagram ports.
   */
  dataTypes: string | Array<string>;
  /**
   * Specifies DOM element selector used for link creation end.
   */
  selector: string;
}
export interface LinkContent {
  /**
   * Specifies custom renderer for the diagram links used for focus updates.
   */
  focusRenderer: null | null;
  /**
   * Specifies custom renderer for the diagram links used for hover updates.
   */
  hoverRenderer: null | null;
  /**
   * Specifies custom renderer for the diagram links used for selection updates.
   */
  selectionRenderer: null | null;
}
export interface NodeContent {
  /**
   * Specifies custom renderer for the diagram nodes used for focus updates.
   */
  focusRenderer: null | null;
  /**
   * Specifies custom renderer for the diagram nodes used for hover updates.
   */
  hoverRenderer: null | null;
  /**
   * Specifies custom renderer for the diagram nodes used for selection updates.
   */
  selectionRenderer: null | null;
  /**
   * Specifies custom renderer for the diagram nodes used for zoom updates.
   */
  zoomRenderer: null | null;
}
export interface Overview {
  /**
   * Specifies the region that will be scaled to fit within the overview.
   */
  fitArea: string;
  /**
   * Horizontal alignment for diagram overview window
   */
  halign: string;
  /**
   * Overview window height.
   */
  height: number;
  /**
   * Controls how the fit area is scaled within the overview.
   */
  preserveAspectRatio: string;
  /**
   * Specifies whether the overview scrollbar is rendered.
   */
  rendered: string;
  /**
   * Vertical alignment for diagram overview window
   */
  valign: string;
  /**
   * Overview window width.
   */
  width: number;
}
export interface PanZoomState {
  /**
   * The x coordinate of the center of the viewport
   */
  centerX: number | null;
  /**
   * The y coordinate of the center of the viewport
   */
  centerY: number | null;
  /**
   * The zoom value in the range of min/max-zoom
   */
  zoom: number;
}
export interface StyleDefaults {
  /**
   * Defines animation duration in milliseconds.
   */
  animationDuration: number;
  /**
   * Specifies initial hover delay in milliseconds for highlighting data items.
   */
  hoverBehaviorDelay: number;
  /**
   * Default link styles
   */
  linkDefaults: StyleDefaultsLinkDefaults;
  /**
   * Default node styles
   */
  nodeDefaults: StyleDefaultsNodeDefaults;
  /**
   * Promoted link styles
   */
  promotedLink: StyleDefaultsPromotedLink;
}
export interface StyleDefaultsLinkDefaults {
  /**
   * Default link color.
   */
  color: string;
  /**
   * Specifies the type of end connector on the link.
   */
  endConnectorType: string;
  /**
   * Specifies CSS styles for the link label.
   */
  labelStyle: object;
  /**
   * Specifies the type of start connector on the link.
   */
  startConnectorType: string;
  /**
   * The default SVG CSS style class to apply to the link.
   */
  svgClassName: string;
  /**
   * Specifies SVG CSS styles for the link.
   */
  svgStyle: object;
  /**
   * Default link width in pixels.
   */
  width: number;
}
export interface StyleDefaultsNodeDefaults {
  /**
   * Default style for the node icon.
   */
  icon: StyleDefaultsNodeDefaultsIcon;
  /**
   * Specifies CSS styles for the node label.
   */
  labelStyle: object;
  /**
   * Determines when to display the expand/collapse button.
   */
  showDisclosure: string;
}
export interface StyleDefaultsNodeDefaultsIcon {
  /**
   * Default border color of the icon.
   */
  borderColor: string;
  /**
   * Specifies default border radius of the icon.
   */
  borderRadius: string;
  /**
   * Default border width of the icon in pixels.
   */
  borderWidth: number;
  /**
   * Default color of the icon.
   */
  color: string;
  /**
   * Default icon height.
   */
  height: number;
  /**
   * Default fill pattern of the icon.
   */
  pattern: string;
  /**
   * Specifies default shape of the icon.
   */
  shape: string;
  /**
   * The URI of the node image
   * @deprecated Since 17.0.0. Node source property has been deprecated. Please use custom renderer instead.
   */
  source: string;
  /**
   * The optional URI of the node hover image.
   * @deprecated Since 17.0.0. Node sourceHover property has been deprecated. Please use custom renderer instead.
   */
  sourceHover: string;
  /**
   * The optional URI of the selected image on hover.
   * @deprecated Since 17.0.0. Node sourceHoverSelected property has been deprecated. Please use custom renderer instead.
   */
  sourceHoverSelected: string;
  /**
   * The optional URI of the selected image.
   * @deprecated Since 17.0.0. Node sourceSelected property has been deprecated. Please use custom renderer instead.
   */
  sourceSelected: string;
  /**
   * The SVG CSS style class to apply to the node icon.
   */
  svgClassName: string;
  /**
   * Specifies CSS styles for the icon.
   */
  svgStyle: object;
  /**
   * Default icon width.
   */
  width: number;
}
export interface StyleDefaultsPromotedLink {
  /**
   * Default promoted link color. The default value varies based on theme.
   */
  color: string;
  /**
   * Specifies the type of end connector on the promoted link.
   */
  endConnectorType: string;
  /**
   * Specifies the type of start connector on the promoted link.
   */
  startConnectorType: string;
  /**
   * The SVG CSS style class to apply to the promoted link.
   */
  svgClassName: string;
  /**
   * Specifies CSS styles of the promoted link.
   */
  svgStyle: object;
  /**
   * Default link width in pixels.
   */
  width: number;
}
export interface Tooltip {}
export interface Translations {
  /**
   * Used to describe a container that contains controls.
   */
  accessibleContainsControls: string;
  /**
   * Used to describe the data visualization type for accessibility.
   */
  componentName: string;
  /**
   * Used to display a label and its value.
   */
  labelAndValue: string;
  /**
   * Text shown for clearing multiple selection on touch devices.
   */
  labelClearSelection: string;
  /**
   * Used to display a count out of a total.
   */
  labelCountWithTotal: string;
  /**
   * Label for data visualizations used for accessibility.
   */
  labelDataVisualization: string;
  /**
   * Text shown when the component receives invalid data.
   */
  labelInvalidData: string;
  /**
   * Text shown when the component receives no data.
   */
  labelNoData: string;
  /**
   * Used for the promoted link tooltip - promoted link consists of a single link.
   */
  promotedLink: string;
  /**
   * Used to describe promoted link type for accessibility.
   */
  promotedLinkAriaDesc: string;
  /**
   * Used for the promoted link tooltip - promoted link consists of multiple links.
   */
  promotedLinks: string;
  /**
   * Used to describe the collapsed state for accessibility.
   */
  stateCollapsed: string;
  /**
   * Used to describe a drillable object for accessibility.
   */
  stateDrillable: string;
  /**
   * Used to describe the expanded state for accessibility.
   */
  stateExpanded: string;
  /**
   * Used to describe the hidden state for accessibility.
   */
  stateHidden: string;
  /**
   * Used to describe the isolated state for accessibility.
   */
  stateIsolated: string;
  /**
   * Used to describe the maximized state for accessibility.
   */
  stateMaximized: string;
  /**
   * Used to describe the minimized state for accessibility.
   */
  stateMinimized: string;
  /**
   * Used to describe the selected state for accessibility.
   */
  stateSelected: string;
  /**
   * Used to describe the unselected state for accessibility.
   */
  stateUnselected: string;
  /**
   * Used to describe the visible state for accessibility.
   */
  stateVisible: string;
}
