/**
 * DO NOT EDIT
 *
 * This file was automatically generated by
 *   https://github.com/Polymer/gen-typescript-declarations
 *
 * To modify these typings, edit the source file(s):
 *   http-method-selector-mixin.html
 */

/// <reference path="../polymer/types/lib/utils/mixin.d.ts" />
/// <reference path="../polymer/types/lib/utils/render-status.d.ts" />

declare namespace ArcBehaviors {


  /**
   * A behavior to share common code between both method selectors.
   */
  function HttpMethodSelectorMixin<T extends new (...args: any[]) => {}>(base: T): T & HttpMethodSelectorMixinConstructor;

  interface HttpMethodSelectorMixinConstructor {
    new(...args: any[]): HttpMethodSelectorMixin;
  }

  interface HttpMethodSelectorMixin {
    readonly standardMethods: any;

    /**
     * Currently selected HTTP method
     */
    method: string|null|undefined;

    /**
     * True if the request for selected HTTP method can carry a payload. It
     * is defined in HTTP spec.
     */
    readonly isPayload: boolean|null|undefined;

    /**
     * Set to true when the user opens the dropdown menu
     */
    methodMenuOpened: boolean|null|undefined;
    showCustom: boolean|null|undefined;
    _attachListeners(node: any): void;
    _detachListeners(node: any): void;

    /**
     * Compute if the tayload can carry a payload.
     */
    _computeIsPayload(method: any): any;

    /**
     * Handler for `isPayload` property change
     */
    _onIsPayloadChanged(value: any): void;

    /**
     * Handler for `method` property chnage
     */
    _methodChanged(method: any): void;

    /**
     * Responds to an event requesting status check for `isPayload` propery by setting the `value`
     * property on the event and canceling the event.
     */
    _isPayloadStatusHandler(e: any): void;

    /**
     * If the event source is not this element it will update the method value.
     */
    _methodChangedHandler(e: any): void;
    closeCustom(): void;

    /**
     * Checks if there is an empty method name and if it is it will set `showCustom` property
     * that constrolls display of a custom method input.
     */
    _dropdownMenuOpened(opened: any, method: any): void;
  }
}
