import { Component, Prop, Host, Element, h, getAssetPath } from '@stencil/core';
export class SparkleGwwCommentList {
  dismiss(data) {
    // dismiss the closest modal and optionally pass back data
    this.el.closest('ion-modal').dismiss({
      'dismissed': true
    });
  }
  render() {
    return (h(Host, null,
      h("ion-toolbar", { color: "primary" },
        h("ion-buttons", { slot: "start" },
          h("ion-back-button", { defaultHref: "great-white-wall", onClick: () => this.dismiss() })),
        h("ion-title", null, "Comments")),
      h("ion-content", null, this.comments.map((comment) => h("ion-item", null,
        h("ion-avatar", { class: "avatar", slot: "start" },
          h("img", { src: getAssetPath("/assets/img/user.png") })),
        h("ion-label", null,
          h("h2", null, comment.Name),
          h("p", null, comment.Comment)))))));
  }
  static get is() { return "sparkle-gww-comment-list"; }
  static get originalStyleUrls() { return {
    "$": ["sparkle-gww-comment-list.css"]
  }; }
  static get styleUrls() { return {
    "$": ["sparkle-gww-comment-list.css"]
  }; }
  static get properties() { return {
    "comments": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "CommentViewModel[]",
        "resolved": "CommentViewModel[]",
        "references": {
          "CommentViewModel": {
            "location": "import",
            "path": "../../../../models/class.model"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
  static get elementRef() { return "el"; }
}
