'use strict';

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

var headerText = require('./headerText-2eeecf55.js');
var paragraphText = require('./paragraphText-6f209f78.js');
var TsIcon = require('./TsIcon.js');
var TsBadge = require('./TsBadge.js');
var TsAvatar = require('./TsAvatar.js');
var TsButton = require('./TsButton.js');
var vue = require('vue');
require('./TsImageLoader.js');

var script = {
    components: {
        TsHeaderText: headerText.script,
        TsParagraphText: paragraphText.script,
        TsIcon: TsIcon["default"],
        TsBadge: TsBadge["default"],
        TsAvatar: TsAvatar["default"],
        TsButton: TsButton["default"],
    },
    props: {
        cardLinecolor: {
            type: String,
            default: "purple",
        },
        customClass: {
            type: String,
            default: "w-full col-span-full",
        },
        badgeColor: {
            type: String,
            default: "purple",
        },
        avatarUrl: {
            type: String,
            default: "/images/avatar2.png",
        },
        showButton: {
            type: Boolean,
            default: false,
        },
        sessionIsClose: {
            type: Boolean,
            default: false,
        },
        paymentPending: {
            type: Boolean,
            default: false,
        },
        data: {
            type: Object,
        },
    },
    name: "TsSessionCard",
};

const _hoisted_1 = { class: "flex flex-row items-center justify-between" };
const _hoisted_2 = {
  key: 0,
  class: /*#__PURE__*/vue.normalizeClass(`flex flex-row items-center space-x-2 text-errorColor text-xs`)
};
const _hoisted_3 = { class: "flex flex-row items-center space-x-2 pt-1 text-xs text-paragraphText" };
const _hoisted_4 = {
  key: 1,
  class: "pt-2 w-full text-left justify-start"
};

function render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ts_header_text = vue.resolveComponent("ts-header-text");
  const _component_ts_badge = vue.resolveComponent("ts-badge");
  const _component_ts_icon = vue.resolveComponent("ts-icon");
  const _component_ts_avatar = vue.resolveComponent("ts-avatar");
  const _component_ts_paragraph_text = vue.resolveComponent("ts-paragraph-text");
  const _component_ts_button = vue.resolveComponent("ts-button");
  const _component_router_link = vue.resolveComponent("router-link");

  return (vue.openBlock(), vue.createBlock(_component_router_link, {
    to: `/sessions/${$props.data?.id}`,
    class: vue.normalizeClass(`${$props.customClass} px-3 py-3 flex flex-col space-y-1 border-[1px] border-gray-200 rounded
	${$props.cardLinecolor == 'purple' ? '!border-l-primaryPurple' : ''}
	${$props.cardLinecolor == 'green' ? '!border-l-primaryGreen' : ''}
	${$props.cardLinecolor == 'yellow' ? '!border-l-primaryYellow' : ''}
	${$props.cardLinecolor == 'red' ? '!border-l-errorColor' : ''} 
	${$props.cardLinecolor == 'gray' ? '!border-l-primaryGray' : ''} !border-l-[4px] `)
  }, {
    default: vue.withCtx(() => [
      vue.createElementVNode("div", _hoisted_1, [
        vue.createVNode(_component_ts_header_text, { size: "base" }, {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "session-name")
          ]),
          _: 3 /* FORWARDED */
        }),
        vue.createVNode(_component_ts_badge, { color: $props.badgeColor }, {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "badge-text")
          ]),
          _: 3 /* FORWARDED */
        }, 8 /* PROPS */, ["color"])
      ]),
      ($props.paymentPending)
        ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2, [
            vue.createVNode(_component_ts_icon, {
              name: "pending-card",
              "custom-class": "h-[12px]"
            }),
            vue.createElementVNode("span", null, [
              vue.renderSlot(_ctx.$slots, "pending-message")
            ])
          ]))
        : vue.createCommentVNode("v-if", true),
      vue.createElementVNode("span", {
        class: vue.normalizeClass(`flex flex-row items-center space-x-2 text-xs ${
        $props.sessionIsClose ? 'text-errorColor' : 'text-paragraphTextLight'
      } `)
      }, [
        ($props.sessionIsClose)
          ? (vue.openBlock(), vue.createBlock(_component_ts_icon, {
              key: 0,
              name: "calender-red",
              "custom-class": "h-[12px]"
            }))
          : (vue.openBlock(), vue.createBlock(_component_ts_icon, {
              key: 1,
              name: "calender",
              "custom-class": "h-[12px]"
            })),
        vue.createElementVNode("span", null, [
          vue.renderSlot(_ctx.$slots, "date")
        ]),
        vue.createElementVNode("span", {
          class: vue.normalizeClass(`h-[5px] w-[5px] ${
          $props.sessionIsClose ? 'bg-errorColor' : 'bg-paragraphTextLight'
        }  rounded-full`)
        }, null, 2 /* CLASS */),
        vue.createElementVNode("span", null, [
          vue.renderSlot(_ctx.$slots, "time")
        ])
      ], 2 /* CLASS */),
      vue.createElementVNode("span", _hoisted_3, [
        vue.createVNode(_component_ts_avatar, {
          "photo-url": $props.avatarUrl,
          size: "17"
        }, null, 8 /* PROPS */, ["photo-url"]),
        vue.createVNode(_component_ts_paragraph_text, { faded: true }, {
          default: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "tutor-name")
          ]),
          _: 3 /* FORWARDED */
        })
      ]),
      ($props.showButton)
        ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4, [
            vue.createVNode(_component_ts_button, { "bg-color": "bg-primaryPurple" }, {
              default: vue.withCtx(() => [
                vue.renderSlot(_ctx.$slots, "button-text")
              ]),
              _: 3 /* FORWARDED */
            })
          ]))
        : vue.createCommentVNode("v-if", true)
    ]),
    _: 3 /* FORWARDED */
  }, 8 /* PROPS */, ["to", "class"]))
}

script.render = render;
script.__file = "src/components/TsSessionCard/index.vue";

exports["default"] = script;
