'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-1141a245.js');
const calendar = require('./calendar-e4b7baeb.js');
require('./index-b776fc14.js');
require('./_commonjsHelpers-206db00d.js');
require('./moment-7a3433f2.js');

const atamaStructuredPairOverviewMeetingRowIntenseCss = "atama-structured-pair-overview-meeting-row-intense{display:-ms-flexbox;display:flex;margin-bottom:calc(4 * var(--spacing-unit));position:relative}atama-structured-pair-overview-meeting-row-intense:first-child{margin-top:calc(2 * var(--spacing-unit))}atama-structured-pair-overview-meeting-row-intense:last-child{margin-bottom:calc(2 * var(--spacing-unit))}atama-structured-pair-overview-meeting-row-intense .step{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0 calc(2 * var(--spacing-unit)) 0 0;height:calc(5 * var(--spacing-unit));width:calc(5 * var(--spacing-unit));border-radius:50%;font-weight:bold;font-size:var(--font-size-small);color:var(--color-text-secondary);background:var(--color-disabled);cursor:default}atama-structured-pair-overview-meeting-row-intense .step.completed{background:#D2F0E9}atama-structured-pair-overview-meeting-row-intense .step img{height:calc(3 * var(--spacing-unit));width:calc(3 * var(--spacing-unit))}atama-structured-pair-overview-meeting-row-intense .meeting-date{color:var(--color-secondary);margin-top:calc(1 * var(--spacing-unit));margin-left:calc(7 * var(--spacing-unit));font-weight:bold}";

const checkIconBase64 = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CgogPGc+CiAgPHRpdGxlPmJhY2tncm91bmQ8L3RpdGxlPgogIDxyZWN0IGZpbGw9Im5vbmUiIGlkPSJjYW52YXNfYmFja2dyb3VuZCIgaGVpZ2h0PSI0MDIiIHdpZHRoPSI1ODIiIHk9Ii0xIiB4PSItMSIvPgogPC9nPgogPGc+CiAgPHRpdGxlPkxheWVyIDE8L3RpdGxlPgogIDxwYXRoIGZpbGw9IiMwMGJkOWMiIGlkPSJzdmdfMSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJtMjEuNjUyLDMuMjExYy0wLjI5MywtMC4yOTUgLTAuNzcsLTAuMjk1IC0xLjA2MSwwbC0xMS4xODEsMTEuMTI5Yy0wLjI5MywwLjI5NyAtMC43NzEsMC4yOTcgLTEuMDYyLDBsLTQuODk5LC00Ljk4OWMtMC4xNDUsLTAuMTQ4IC0wLjMzNSwtMC4yMjEgLTAuNTI2LC0wLjIyMmMtMC4xOTMsLTAuMDAxIC0wLjM4OSwwLjA3MiAtMC41MzYsMC4yMjJsLTIuMTY1LDEuOTQ2Yy0wLjE0NCwwLjE0OCAtMC4yMjIsMC4zMzMgLTAuMjIyLDAuNTI2YzAsMC4xOTQgMC4wNzgsMC4zOTcgMC4yMjMsMC41NDRsNC45NCw1LjE4NGMwLjI5MiwwLjI5NiAwLjc3MSwwLjc3NiAxLjA2MiwxLjA3bDIuMTI0LDIuMTQxYzAuMjkyLDAuMjkzIDAuNzY5LDAuMjkzIDEuMDYyLDBsMTQuMzY2LC0xNC4zNGMwLjI5MywtMC4yOTQgMC4yOTMsLTAuNzc3IDAsLTEuMDcxbC0yLjEyNSwtMi4xNHoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPgogPC9nPgo8L3N2Zz4=';
const AtamaStructuredPairOverview = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
  }
  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 = `${calendar.CalendarUtils.format(startDate, (i18n === null || i18n === void 0 ? void 0 : i18n.dateFormatDay) || 'DD MMM')}, ${calendar.CalendarUtils.format(startDate, (i18n === null || i18n === void 0 ? void 0 : i18n.dateFormatTime) || 'HH:mm')} - ${calendar.CalendarUtils.format(endDate, (i18n === null || i18n === void 0 ? void 0 : i18n.dateFormatTime) || 'HH:mm')}`;
    }
    return (index.h("dvn-card", { elevation: 0, leaned: true, width: "100%" }, index.h("div", null, index.h("div", { class: { step: true, completed } }, completed ? index.h("img", { src: checkIconBase64, alt: "completed" }) : meetingOrder), meetingConfig.name), index.h("div", { class: "meeting-date" }, meetingString), index.h("dvn-card-footer", { slot: "footer", alignRight: true }, !completed && (index.h("div", { class: "d-flex flex-grow-1" }, index.h("dvn-button", { scale: "small", tagMode: true, view: "ghost" }, (i18n === null || i18n === void 0 ? void 0 : i18n.notScheduled) || 'Not scheduled'))), completed &&
      index.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'), index.h("dvn-button", { leaned: true, scale: "small", view: "flat", onClick: () => this.onShowMeetingConfigDetail(meetingConfig) }, (i18n === null || i18n === void 0 ? void 0 : i18n.viewDetails) || 'View Details'))));
  }
};
AtamaStructuredPairOverview.style = atamaStructuredPairOverviewMeetingRowIntenseCss;

exports.atama_structured_pair_overview_meeting_row_intense = AtamaStructuredPairOverview;
