import { withHooks } from "@saasquatch/stencil-hooks";
import { Component, Prop, State } from "@stencil/core";
import { DateTime } from "luxon";
import { luxonLocale } from "../../../utils/utils";
export class ReferralTableDateCell {
  constructor() {
    this.ignored = true;
    this.locale = "en";
    withHooks(this);
  }
  disconnectedCallback() { }
  render() {
    var _a;
    const date = !this.date
      ? "-"
      : (_a = DateTime.fromMillis(this.date)) === null || _a === void 0 ? void 0 : _a.setLocale(luxonLocale(this.locale)).toLocaleString(DateTime.DATE_MED);
    return date;
  }
  static get is() { return "sqm-referral-table-date-cell"; }
  static get encapsulation() { return "shadow"; }
  static get properties() { return {
    "date": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "date",
      "reflect": false
    },
    "locale": {
      "type": "string",
      "mutable": false,
      "complexType": {
        "original": "string",
        "resolved": "string",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "locale",
      "reflect": false,
      "defaultValue": "\"en\""
    }
  }; }
  static get states() { return {
    "ignored": {}
  }; }
}
