import { s as script$1 } from './headerText-0fd3adc1.mjs';
import { s as script$2 } from './paragraphText-9913c76e.mjs';
import script$3 from './TsIcon.mjs';
import script$4 from './TsBadge.mjs';
import script$5 from './TsAvatar.mjs';
import script$6 from './TsButton.mjs';
import { resolveComponent, openBlock, createBlock, normalizeClass, withCtx, createElementVNode, createVNode, renderSlot, createElementBlock, createCommentVNode } from 'vue';
import './TsImageLoader.mjs';

var script = {
    components: {
        TsHeaderText: script$1,
        TsParagraphText: script$2,
        TsIcon: script$3,
        TsBadge: script$4,
        TsAvatar: script$5,
        TsButton: script$6,
    },
    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__*/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 = resolveComponent("ts-header-text");
  const _component_ts_badge = resolveComponent("ts-badge");
  const _component_ts_icon = resolveComponent("ts-icon");
  const _component_ts_avatar = resolveComponent("ts-avatar");
  const _component_ts_paragraph_text = resolveComponent("ts-paragraph-text");
  const _component_ts_button = resolveComponent("ts-button");
  const _component_router_link = resolveComponent("router-link");

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

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

export { script as default };
