unit Progress;

interface

type
  JProgressJsStatic = class external
    function(targetElm: String): JProgressJs;
  end;

  JProgressJs = class external
    function start: JProgressJs
    function set(percent: Float): JProgressJs
    function autoIncrease(size: Float; millisecond: Float): JProgressJs
    function increase: JProgressJs overload;
    function increase(size: Float): JProgressJs overload;
    function end: JProgressJs
    function setOption(option: String; value: String): JProgressJs
    function setOption(option: String; value: Boolean): JProgressJs
    function setOptions(options: JProgressJsOptions): JProgressJs
    function onbeforeend(providedCallback: function: Variant): JProgressJs
    function onbeforestart(providedCallback: function: Variant): JProgressJs
    function onprogress(providedCallback: function(targetElement: String; percent: Float): Variant): JProgressJs
  end;

  JProgressJsOptions = class external
    theme: String; // nullable
    overlayMode: Boolean; // nullable
    considerTransition: Boolean; // nullable
  end;

progressJs: JProgressJsStatic;
