import { getUserInitials } from '@dvn/kimlik/api/models/User';
import { Component, h, Host, Prop } from '@stencil/core';
export class DevingenTopBar {
  render() {
    const { user } = this;
    return (h(Host, { class: "d-flex justify-content-between align-items-center" },
      h("div", null,
        h("a", { href: "/" },
          h("img", { class: "logo", src: "https://cdn.dribbble.com/users/60166/screenshots/4117670/media/f2bb5c62b78b5e1f7113dd793e772bfc.jpg" }))),
      h("div", { class: "user-info-container" },
        h("dvn-dropdown", { placement: "bottomRight", trigger: "click" },
          h("dvn-image", { bordered: true, src: user === null || user === void 0 ? void 0 : user.imageUrl, shape: "circle", text: user ? getUserInitials(user) : '?' }),
          h("div", { slot: "content" },
            h("dvn-menu", { leaned: true },
              h("dvn-menu-item", null,
                h("kimlik-logout-action", null,
                  h("dvn-info-summary", { title: "Logout", width: "120px" })))))))));
  }
  static get is() { return "devingen-top-bar"; }
  static get originalStyleUrls() { return {
    "$": ["./devingen-top-bar.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["devingen-top-bar.css"]
  }; }
  static get properties() { return {
    "user": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "User",
        "resolved": "User",
        "references": {
          "User": {
            "location": "import",
            "path": "@dvn/kimlik/api/models"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    }
  }; }
}
