import CalendarUtils from '@dvn/core/util/calendar';
import { Component, h, Prop } from '@stencil/core';
const checkIconBase64 = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CgogPGc+CiAgPHRpdGxlPmJhY2tncm91bmQ8L3RpdGxlPgogIDxyZWN0IGZpbGw9Im5vbmUiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgaGVpZ2h0PSI0MDIiIHdpZHRoPSI1ODIiIHk9Ii0xIiB4PSItMSIvPgogPC9nPgogPGc+CiAgPHRpdGxlPkxheWVyIDE8L3RpdGxlPgogIDxwYXRoIGZpbGw9IiMwMGJkOWMiIGlkPSJzdmdfMSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMjEuNjUyLDMuMjExYy0wLjI5MywtMC4yOTUgLTAuNzcsLTAuMjk1IC0xLjA2MSwwbC0xMS4xODEsMTEuMTI5Yy0wLjI5MywwLjI5NyAtMC43NzEsMC4yOTcgLTEuMDYyLDBsLTQuODk5LC00Ljk4OWMtMC4xNDUsLTAuMTQ4IC0wLjMzNSwtMC4yMjEgLTAuNTI2LC0wLjIyMmMtMC4xOTMsLTAuMDAxIC0wLjM4OSwwLjA3MiAtMC41MzYsMC4yMjJsLTIuMTY1LDEuOTQ2Yy0wLjE0NCwwLjE0OCAtMC4yMjIsMC4zMzMgLTAuMjIyLDAuNTI2YzAsMC4xOTQgMC4wNzgsMC4zOTcgMC4yMjMsMC41NDRsNC45NCw1LjE4NGMwLjI5MiwwLjI5NiAwLjc3MSwwLjc3NiAxLjA2MiwxLjA3bDIuMTI0LDIuMTQxYzAuMjkyLDAuMjkzIDAuNzY5LDAuMjkzIDEuMDYyLDBsMTQuMzY2LC0xNC4zNGMwLjI5MywtMC4yOTQgMC4yOTMsLTAuNzc3IDAsLTEuMDcxbC0yLjEyNSwtMi4xNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPgogPC9nPgo8L3N2Zz4=';
export class AtamaStructuredPairOverview {
  render() {
    const { i18n, meeting, meetingConfig, meetingOrder } = this;
    const completed = !!meeting;
    let meetingString;
    if (meeting) {
      const startDate = new Date(meeting.startDate);
      const endDate = new Date(meeting.endDate);
      meetingString = `${CalendarUtils.format(startDate, (i18n === null || i18n === void 0 ? void 0 : i18n.dateFormatDay) || 'DD MMM')}, ${CalendarUtils.format(startDate, (i18n === null || i18n === void 0 ? void 0 : i18n.dateFormatTime) || 'HH:mm')} - ${CalendarUtils.format(endDate, (i18n === null || i18n === void 0 ? void 0 : i18n.dateFormatTime) || 'HH:mm')}`;
    }
    return (h("dvn-card", { elevation: 0, leaned: true, width: "100%" },
      h("div", null,
        h("div", { class: { step: true, completed } }, completed ? h("img", { src: checkIconBase64, alt: "completed" }) : meetingOrder),
        meetingConfig.name),
      h("div", { class: "meeting-date" }, meetingString),
      h("dvn-card-footer", { slot: "footer", alignRight: true },
        !completed && (h("div", { class: "d-flex flex-grow-1" },
          h("dvn-button", { scale: "small", tagMode: true, view: "ghost" }, (i18n === null || i18n === void 0 ? void 0 : i18n.notScheduled) || 'Not scheduled'))),
        completed &&
          h("dvn-button", { scale: "small", tint: "secondary", view: "outline", onClick: () => this.onShowMeetingDetail(meeting) }, (i18n === null || i18n === void 0 ? void 0 : i18n.goToSessionPage) || 'Go to Session Page'),
        h("dvn-button", { leaned: true, scale: "small", view: "flat", onClick: () => this.onShowMeetingConfigDetail(meetingConfig) }, (i18n === null || i18n === void 0 ? void 0 : i18n.viewDetails) || 'View Details'))));
  }
  static get is() { return "atama-structured-pair-overview-meeting-row-intense"; }
  static get originalStyleUrls() { return {
    "$": ["./atama-structured-pair-overview-meeting-row-intense.scss"]
  }; }
  static get styleUrls() { return {
    "$": ["atama-structured-pair-overview-meeting-row-intense.css"]
  }; }
  static get properties() { return {
    "i18n": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "AtamaMemberPairDetailViewI18n",
        "resolved": "AtamaMemberPairDetailViewI18n",
        "references": {
          "AtamaMemberPairDetailViewI18n": {
            "location": "import",
            "path": "../../views/atama-member-pair-detail-view-config"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "onCreateMeeting": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "(config: MeetingStructureMeetingConfig) => void",
        "resolved": "(config: MeetingStructureMeetingConfig) => void",
        "references": {
          "MeetingStructureMeetingConfig": {
            "location": "import",
            "path": "@dvn/core/models/meeting-structure-config"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "onShowMeetingDetail": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "(meeting: DataModel) => void",
        "resolved": "(meeting: DataModel) => void",
        "references": {
          "DataModel": {
            "location": "import",
            "path": "@dvn/core/models/data-model"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "onShowMeetingConfigDetail": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "(config: MeetingStructureMeetingConfig) => void",
        "resolved": "(config: MeetingStructureMeetingConfig) => void",
        "references": {
          "MeetingStructureMeetingConfig": {
            "location": "import",
            "path": "@dvn/core/models/meeting-structure-config"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "meeting": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "DataModel",
        "resolved": "DataModel",
        "references": {
          "DataModel": {
            "location": "import",
            "path": "@dvn/core/models/data-model"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "meetingConfig": {
      "type": "unknown",
      "mutable": false,
      "complexType": {
        "original": "MeetingStructureMeetingConfig",
        "resolved": "MeetingStructureMeetingConfig",
        "references": {
          "MeetingStructureMeetingConfig": {
            "location": "import",
            "path": "@dvn/core/models/meeting-structure-config"
          }
        }
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      }
    },
    "meetingOrder": {
      "type": "number",
      "mutable": false,
      "complexType": {
        "original": "number",
        "resolved": "number",
        "references": {}
      },
      "required": false,
      "optional": false,
      "docs": {
        "tags": [],
        "text": ""
      },
      "attribute": "meeting-order",
      "reflect": false
    }
  }; }
}
