import { withHooks } from "@saasquatch/stencil-hooks";
import { Component, h, Method, Prop, State } from "@stencil/core";
import { useRequestRerender } from "../../tables/re-render";
import { getProps } from "../../utils/utils";
import { TimelineEntryView } from "./sqm-timeline-entry-view";
/**
 * @uiName Program Timeline Entry
 * @validParents ["sqm-timeline"]
 * @exampleGroup Common Components
 * @example Timeline Entry - <sqm-timeline-entry reward="$50" unit="visa giftcard" desc="You refer a friend" icon="circle" > </sqm-timeline-entry>
 */
export class TimelineReward {
  constructor() {
    this.ignored = true;
    this.iconState = "gift";
    withHooks(this);
  }
  async setIcon(value) {
    this.iconState = value;
  }
  disconnectedCallback() { }
  render() {
    useRequestRerender([this.reward]);
    return h(TimelineEntryView, Object.assign({}, getProps(this)));
  }
  static get is() { return "sqm-timeline-entry"; }
  static get encapsulation() { return "shadow"; }
  static get properties() { return {
    "textColor": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [{
            "text": "Text color",
            "name": "uiName"
          }, {
            "text": "color",
            "name": "uiWidget"
          }, {
            "text": "color",
            "name": "format"
          }],
        "text": "Color of the text and copy icon"
      },
      "attribute": "text-color",
      "reflect": false
    },
    "lineColor": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": true,
      "docs": {
        "tags": [{
            "text": "Line color",
            "name": "uiName"
          }, {
            "text": "color",
            "name": "uiWidget"
          }, {
            "text": "color",
            "name": "format"
          }],
        "text": "Color of timeline"
      },
      "attribute": "line-color",
      "reflect": false
    },
    "reward": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Reward amount",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "reward",
      "reflect": false
    },
    "unit": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Reward unit",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "unit",
      "reflect": false
    },
    "desc": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Description",
            "name": "uiName"
          }],
        "text": ""
      },
      "attribute": "desc",
      "reflect": false
    },
    "icon": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "\"gift\" | \"circle\"",
        "resolved": "\"circle\" | \"gift\"",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [{
            "text": "Icon",
            "name": "uiName"
          }, {
            "text": "string",
            "name": "uiType"
          }, {
            "text": "[\"gift\", \"circle\"]",
            "name": "uiEnum"
          }, {
            "text": "[\"Gift\", \"Circle\"]",
            "name": "uiEnumNames"
          }],
        "text": ""
      },
      "attribute": "icon",
      "reflect": false
    }
  }; }
  static get states() { return {
    "ignored": {},
    "iconState": {}
  }; }
  static get methods() { return {
    "setIcon": {
      "complexType": {
        "signature": "(value: \"gift\" | \"circle\") => Promise<void>",
        "parameters": [{
            "tags": [],
            "text": ""
          }],
        "references": {
          "Promise": {
            "location": "global"
          }
        },
        "return": "Promise<void>"
      },
      "docs": {
        "text": "",
        "tags": []
      }
    }
  }; }
}
