import { s as script$4 } from './headerText-0fd3adc1.mjs';
import { s as script$5 } from './normalText-66005fcf.mjs';
import script$6 from './TsIcon.mjs';
import { ref, onMounted, watch, resolveComponent, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, withCtx, renderList, createBlock, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, withModifiers, defineComponent } from 'vue';
import script$7 from './TsCalendar.mjs';
import script$8 from './TsSessionCard.mjs';
import script$9 from './TsButton.mjs';
import { L as Logic } from './index-2059e79e.mjs';

var script$3 = {
    components: {
        TsHeaderText: script$4,
        TsNormalText: script$5,
        TsIcon: script$6,
    },
    props: {
        tabIsActive: {
            type: Function,
            required: true,
        },
        accountType: {
            type: String,
            default: "",
        },
    },
    name: "TsSideBar",
    setup(props) {
        const tabs = ref([]);
        const setRoutes = () => {
            tabs.value = [];
            tabs.value.push({
                name: "Home",
                path: "/",
                icon: "home",
                routeTag: "base",
            });
            if (props.accountType == "student") {
                tabs.value.push({
                    name: "Tutors",
                    path: "/tutors",
                    icon: "tutors",
                    routeTag: "tutors",
                });
            }
            tabs.value.push({
                name: "Sessions",
                path: "/sessions",
                icon: "sessions",
                routeTag: "sessions",
                icon_size: "lg:h-[17px] mdlg:h-[16px]",
            }, {
                name: "Questions",
                path: "/questions",
                icon: "questions",
                routeTag: "questions",
            });
        };
        onMounted(() => {
            setRoutes();
        });
        watch(props, () => {
            setRoutes();
        });
        const hoverTab = ref("");
        return {
            hoverTab,
            tabs,
        };
    },
};

const _hoisted_1$3 = { class: "flex flex-row space-x-2 items-center" };
const _hoisted_2$3 = /*#__PURE__*/createElementVNode("img", {
  src: "/images/logo.svg",
  class: "h-[22px]"
}, null, -1 /* HOISTED */);
const _hoisted_3$1 = /*#__PURE__*/createTextVNode(" Tutor Stack ");
const _hoisted_4$1 = { class: "flex flex-col space-y-2 pt-6" };

function render$3(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ts_header_text = resolveComponent("ts-header-text");
  const _component_ts_icon = resolveComponent("ts-icon");
  const _component_ts_normal_text = resolveComponent("ts-normal-text");
  const _component_router_link = resolveComponent("router-link");

  return (openBlock(), createElementBlock(Fragment, null, [
    createElementVNode("span", _hoisted_1$3, [
      _hoisted_2$3,
      createVNode(_component_ts_header_text, null, {
        default: withCtx(() => [
          _hoisted_3$1
        ]),
        _: 1 /* STABLE */
      })
    ]),
    createElementVNode("div", _hoisted_4$1, [
      (openBlock(true), createElementBlock(Fragment, null, renderList($setup.tabs, (tab, index) => {
        return (openBlock(), createBlock(_component_router_link, {
          key: index,
          to: tab.path,
          onMouseover: $event => ($setup.hoverTab = tab.icon),
          onMouseleave: _cache[0] || (_cache[0] = $event => ($setup.hoverTab = '')),
          class: normalizeClass(`flex flex-row py-2 items-center px-3 space-x-3 ${
        $setup.hoverTab == tab.icon || $props.tabIsActive(tab.routeTag)
          ? 'bg-fadedBackground '
          : ''
      } rounded`)
        }, {
          default: withCtx(() => [
            createVNode(_component_ts_icon, {
              name: 
          $setup.hoverTab == tab.icon || $props.tabIsActive(tab.routeTag)
            ? `${tab.icon}_active`
            : tab.icon
        ,
              "custom-class": ` ${
          tab.icon_size ? tab.icon_size : 'lg:h-[19px] mdlg:h-[19px]'
        } `
            }, null, 8 /* PROPS */, ["name", "custom-class"]),
            createVNode(_component_ts_normal_text, {
              "custom-class": "pt-[2px]",
              color: `${
          $setup.hoverTab == tab.icon || $props.tabIsActive(tab.routeTag)
            ? 'text-headerText'
            : 'text-gray-400'
        } `
            }, {
              default: withCtx(() => [
                createTextVNode(toDisplayString(tab.name), 1 /* TEXT */)
              ]),
              _: 2 /* DYNAMIC */
            }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["color"])
          ]),
          _: 2 /* DYNAMIC */
        }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["to", "onMouseover", "class"]))
      }), 128 /* KEYED_FRAGMENT */))
    ])
  ], 64 /* STABLE_FRAGMENT */))
}

script$3.render = render$3;
script$3.__file = "src/components/TsNavigation/sideBar.vue";

var script$2 = {
    components: {
        TsHeaderText: script$4,
        TsNormalText: script$5,
        TsCalendar: script$7,
        TsSessionCard: script$8,
    },
    props: {},
    name: "TsCalendarBar",
};

const _hoisted_1$2 = { class: "w-full flex flex-row justify-between items-center pt-3" };
const _hoisted_2$2 = /*#__PURE__*/createTextVNode(" Upcoming sessions ");
const _hoisted_3 = /*#__PURE__*/createTextVNode("View all");
const _hoisted_4 = { class: "w-full flex flex-row justify-between items-center pt-3" };
const _hoisted_5 = /*#__PURE__*/createTextVNode("Tuesday, June 3, 2022");
const _hoisted_6 = { class: "w-full flex flex-col space-y-3 pt-3" };
const _hoisted_7 = /*#__PURE__*/createTextVNode(" Cherokee Indians ");
const _hoisted_8 = /*#__PURE__*/createTextVNode(" Shared ");
const _hoisted_9 = /*#__PURE__*/createTextVNode(" Today ");
const _hoisted_10 = /*#__PURE__*/createTextVNode(" 11am - 12pm ");
const _hoisted_11 = /*#__PURE__*/createTextVNode(" Micheal Connors ");
const _hoisted_12 = /*#__PURE__*/createTextVNode(" Enter session ");
const _hoisted_13 = /*#__PURE__*/createTextVNode(" Algebra ");
const _hoisted_14 = /*#__PURE__*/createTextVNode(" Private ");
const _hoisted_15 = /*#__PURE__*/createTextVNode(" Today ");
const _hoisted_16 = /*#__PURE__*/createTextVNode(" 11am - 12pm ");
const _hoisted_17 = /*#__PURE__*/createTextVNode(" Jonathan Wilson ");
const _hoisted_18 = /*#__PURE__*/createTextVNode(" Hydrocarbons ");
const _hoisted_19 = /*#__PURE__*/createTextVNode(" Private ");
const _hoisted_20 = /*#__PURE__*/createTextVNode(" Today ");
const _hoisted_21 = /*#__PURE__*/createTextVNode(" 11am - 12pm ");
const _hoisted_22 = /*#__PURE__*/createTextVNode(" Saida Sinatra ");

function render$2(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ts_header_text = resolveComponent("ts-header-text");
  const _component_ts_normal_text = resolveComponent("ts-normal-text");
  const _component_ts_calendar = resolveComponent("ts-calendar");
  const _component_ts_session_card = resolveComponent("ts-session-card");

  return (openBlock(), createElementBlock(Fragment, null, [
    createElementVNode("div", _hoisted_1$2, [
      createVNode(_component_ts_header_text, { size: "lg" }, {
        default: withCtx(() => [
          _hoisted_2$2
        ]),
        _: 1 /* STABLE */
      }),
      createElementVNode("div", null, [
        createVNode(_component_ts_normal_text, { color: "text-primaryPurple" }, {
          default: withCtx(() => [
            _hoisted_3
          ]),
          _: 1 /* STABLE */
        })
      ])
    ]),
    createVNode(_component_ts_calendar),
    createElementVNode("div", _hoisted_4, [
      createVNode(_component_ts_normal_text, null, {
        default: withCtx(() => [
          _hoisted_5
        ]),
        _: 1 /* STABLE */
      })
    ]),
    createElementVNode("div", _hoisted_6, [
      createVNode(_component_ts_session_card, {
        "show-button": true,
        "avatar-url": "/images/avatar2.png",
        "badge-color": "green",
        "card-linecolor": "purple",
        "session-is-close": true
      }, {
        "session-name": withCtx(() => [
          _hoisted_7
        ]),
        "badge-text": withCtx(() => [
          _hoisted_8
        ]),
        date: withCtx(() => [
          _hoisted_9
        ]),
        time: withCtx(() => [
          _hoisted_10
        ]),
        "tutor-name": withCtx(() => [
          _hoisted_11
        ]),
        "button-text": withCtx(() => [
          _hoisted_12
        ]),
        _: 1 /* STABLE */
      }),
      createVNode(_component_ts_session_card, {
        "show-button": false,
        "avatar-url": "/images/tutor3.png",
        "badge-color": "purple",
        "card-linecolor": "yellow"
      }, {
        "session-name": withCtx(() => [
          _hoisted_13
        ]),
        "badge-text": withCtx(() => [
          _hoisted_14
        ]),
        date: withCtx(() => [
          _hoisted_15
        ]),
        time: withCtx(() => [
          _hoisted_16
        ]),
        "tutor-name": withCtx(() => [
          _hoisted_17
        ]),
        _: 1 /* STABLE */
      }),
      createVNode(_component_ts_session_card, {
        "show-button": false,
        "avatar-url": "/images/tutor1.png",
        "badge-color": "purple",
        "card-linecolor": "yellow"
      }, {
        "session-name": withCtx(() => [
          _hoisted_18
        ]),
        "badge-text": withCtx(() => [
          _hoisted_19
        ]),
        date: withCtx(() => [
          _hoisted_20
        ]),
        time: withCtx(() => [
          _hoisted_21
        ]),
        "tutor-name": withCtx(() => [
          _hoisted_22
        ]),
        _: 1 /* STABLE */
      })
    ])
  ], 64 /* STABLE_FRAGMENT */))
}

script$2.render = render$2;
script$2.__file = "src/components/TsNavigation/calendarBar.vue";

var script$1 = {
    components: {
        TsIcon: script$6,
        TsHeaderText: script$4,
    },
    props: {
        options: {
            required: true,
        },
        goBack: {
            type: Function,
            required: true,
        },
        goToRoute: {
            type: Function,
            required: true,
        },
    },
    emits: ["update:selectedTab"],
    name: "TsTopBar",
    setup(props, context) {
        const selectedTab = ref("");
        const showMobileSearch = ref(false);
        const selectDefaultTab = () => {
            if (props.options.type == "switch") {
                if (props.options.switchItems) {
                    selectedTab.value = props.options.switchItems[0]?.key;
                }
            }
        };
        onMounted(() => {
            selectDefaultTab();
        });
        watch(props.options, () => {
            selectDefaultTab();
        });
        watch(selectedTab, () => {
            context.emit("update:selectedTab", selectedTab.value);
        });
        return {
            selectedTab,
            showMobileSearch,
        };
    },
};

const _hoisted_1$1 = /*#__PURE__*/createElementVNode("input", {
  type: "text",
  class: "w-[200px] focus:outline-none border-none placeholder-slate-600",
  placeholder: "Search"
}, null, -1 /* HOISTED */);
const _hoisted_2$1 = {
  key: 1,
  type: "text",
  class: "w-full focus:outline-none border-none inline-block mdlg:hidden placeholder-slate-600",
  placeholder: "Search"
};

function render$1(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ts_icon = resolveComponent("ts-icon");
  const _component_ts_header_text = resolveComponent("ts-header-text");

  return (openBlock(), createElementBlock("div", {
    class: normalizeClass(`flex w-full  py-0 z-[99876678999] justify-between mdlg:px-0 px-0 sticky mdlg:pt-2 top-0 bg-white border-b-[1px] 
	${
    $props.options.type == 'basic' || !$setup.showMobileSearch
      ? ' flex-row items-center '
      : 'mdlg:!flex-row lg:!flex-row flex-col mdlg:!items-center lg:!items-center '
  } border-gray-200
  ${!$props.options.showBottomBorder ? 'mdlg:border-none' : 'mdlg:border-b-[1px]'}
  ${$props.options.type != 'basic' && $props.options.type != 'subpage' ? 'px-0' : 'mdlg:!px-0 px-3'}
  ${$props.options.type == 'subpage' ? 'mdlg:!border-none' : ''}`)
  }, [
    ($props.options.type == 'basic' || $props.options.type == 'subpage')
      ? (openBlock(), createBlock(_component_ts_header_text, {
          key: 0,
          size: "xl",
          "custom-class": ` py-3 lg:py-3 mdlg:py-4  flex flex-row items-center lg:pt-6 ${
        $props.options.type == 'subpage' || $props.options.showTitle ? '' : 'mdlg:hidden'
      }`
        }, {
          default: withCtx(() => [
            ($props.options.type == 'subpage')
              ? (openBlock(), createBlock(_component_ts_icon, {
                  key: 0,
                  name: 'chevron-left',
                  onClick: _cache[0] || (_cache[0] = $event => ($props.goBack())),
                  "custom-class": "h-[12px] pr-[10px] cursor-pointer"
                }))
              : createCommentVNode("v-if", true),
            createTextVNode(" " + toDisplayString($props.options.pageTitle), 1 /* TEXT */)
          ]),
          _: 1 /* STABLE */
        }, 8 /* PROPS */, ["custom-class"]))
      : (openBlock(), createElementBlock("div", {
          key: 1,
          class: normalizeClass(` ${
        $setup.showMobileSearch ? ' border-b-[1px]  border-gray-200 mdlg:!border-none' : ''
      } flex flex-row items-center space-x-3 lg:space-x-5 mdlg:!px-0 `)
        }, [
          (openBlock(true), createElementBlock(Fragment, null, renderList($props.options.switchItems, (item, index) => {
            return (openBlock(), createBlock(_component_ts_header_text, {
              size: "xl",
              key: index,
              onClick: withModifiers($event => ($setup.selectedTab = item.key), ["stop"]),
              "custom-class": ` mdlg:border-b-[3px] border-b-[1.5px] px-3 mdlg:px-0 cursor-pointer ${
          $setup.selectedTab == item.key ? ' border-headerText ' : 'border-transparent '
        }   py-3 lg:!pb-2 mdlg:py-3 lg:pt-6`,
              color: `${
          $setup.selectedTab == item.key ? ' text-headerText' : 'text-headerText opacity-40'
        }`
            }, {
              default: withCtx(() => [
                createTextVNode(toDisplayString(item.value), 1 /* TEXT */)
              ]),
              _: 2 /* DYNAMIC */
            }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "custom-class", "color"]))
          }), 128 /* KEYED_FRAGMENT */))
        ], 2 /* CLASS */)),
    ($props.options.type != 'subpage')
      ? (openBlock(), createElementBlock("div", {
          key: 2,
          class: normalizeClass(`hidden  items-center space-x-3 flex-grow mdlg:flex py-3  lg:pt-6 lg:py-3 mdlg:py-5 ${
        $props.options.type == 'basic' && !$props.options.showTitle ? 'flex-row' : 'flex-row-reverse'
      }`)
        }, [
          createVNode(_component_ts_icon, {
            name: "search",
            "custom-class": "h-[17px]"
          }),
          _hoisted_1$1
        ], 2 /* CLASS */))
      : createCommentVNode("v-if", true),
    ($props.options.type != 'subpage')
      ? (openBlock(), createElementBlock("div", {
          key: 3,
          class: normalizeClass(` ${
        $props.options.type == 'basic' ? '' : 'px-3 mdlg:!px-0'
      } space-x-5 flex flex-row items-center py-3 lg:py-3 lg:pt-6 mdlg:py-5`)
        }, [
          createVNode(_component_ts_icon, {
            name: "search",
            "custom-class": "mdlg:h-[17px] h-[17px] inline-block mdlg:hidden"
          }),
          ($props.options.hasNotification)
            ? (openBlock(), createBlock(_component_ts_icon, {
                key: 0,
                name: "bell",
                onClick: _cache[1] || (_cache[1] = $event => ($props.goToRoute('/notifications'))),
                "custom-class": "mdlg:h-[19px] h-[18px] cursor-pointer"
              }))
            : createCommentVNode("v-if", true),
          ($setup.showMobileSearch)
            ? (openBlock(), createElementBlock("input", _hoisted_2$1))
            : createCommentVNode("v-if", true)
        ], 2 /* CLASS */))
      : createCommentVNode("v-if", true)
  ], 2 /* CLASS */))
}

script$1.render = render$1;
script$1.__file = "src/components/TsNavigation/topBar.vue";

var script = defineComponent({
    components: {
        TsIcon: script$6,
        TsButton: script$9,
    },
    props: {
        tabIsActive: {
            type: Function,
            required: true,
        },
        options: {
            required: false,
        },
        accountType: {
            type: String,
            default: "student",
        },
    },
    name: "TsBottomBar",
    setup(props) {
        const tabs = ref([]);
        const setRoutes = () => {
            tabs.value = [];
            tabs.value.push({
                path: "/",
                icon: "home",
                routeTag: "base",
            });
            if (props.accountType == "student") {
                tabs.value.push({
                    path: "/tutors",
                    icon: "tutors",
                    routeTag: "tutors",
                });
            }
            tabs.value.push({
                path: "/sessions",
                icon: "sessions",
                routeTag: "sessions",
                icon_size: "h-[17px]",
            }, {
                path: "/questions",
                icon: "questions",
                routeTag: "questions",
            }, {
                path: props.accountType == "student"
                    ? "/profile"
                    : "/tutors/" + Logic.auth.user.AuthUser?.id,
                icon: "profile",
                routeTag: "profile",
            });
        };
        const hoverTab = ref("");
        watch(props, () => {
            setRoutes();
        });
        onMounted(() => {
            setRoutes();
        });
        return {
            hoverTab,
            tabs,
        };
    },
});

const _hoisted_1 = { class: "flex flex-col items-center py-2 z-50 w-full justify-center mdlg:hidden px-3 fixed left-0 bottom-0 bg-white border-t-[1px] border-gray-200" };
const _hoisted_2 = {
  key: 1,
  class: "w-full flex flex-row items-center space-x-2 justify-end"
};

function render(_ctx, _cache, $props, $setup, $data, $options) {
  const _component_ts_icon = resolveComponent("ts-icon");
  const _component_router_link = resolveComponent("router-link");
  const _component_ts_button = resolveComponent("ts-button");

  return (openBlock(), createElementBlock("div", _hoisted_1, [
    (!_ctx.options.subPage)
      ? (openBlock(), createElementBlock("div", {
          key: 0,
          class: normalizeClass(`w-full grid ${
          _ctx.tabs.length == 5 ? 'grid-cols-10' : 'grid-cols-8'
        }  gap-1 py-2`)
        }, [
          (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.tabs, (tab, index) => {
            return (openBlock(), createBlock(_component_router_link, {
              key: index,
              to: tab.path,
              class: "col-span-2 flex flex-row items-center justify-center"
            }, {
              default: withCtx(() => [
                createVNode(_component_ts_icon, {
                  name: 
              _ctx.hoverTab == tab.icon || _ctx.tabIsActive(tab.routeTag)
                ? `${tab.icon}_active`
                : tab.icon
            ,
                  "custom-class": ` ${
              tab.icon_size ? tab.icon_size : 'lg:h-[19px] mdlg:h-[17px]'
            } `
                }, null, 8 /* PROPS */, ["name", "custom-class"])
              ]),
              _: 2 /* DYNAMIC */
            }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["to"]))
          }), 128 /* KEYED_FRAGMENT */))
        ], 2 /* CLASS */))
      : (openBlock(), createElementBlock("div", _hoisted_2, [
          (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options.actions, (action, index) => {
            return (openBlock(), createBlock(_component_ts_button, {
              key: index,
              onClick: $event => (action.action()),
              customClass: `${
            action.outlined ? 'border-[2px]  border-primaryPurple' : ''
          }`,
              bgColor: `${action.outlined ? 'bg-white' : 'bg-primaryPurple'}`,
              padding: 'px-4 py-2'
            }, {
              default: withCtx(() => [
                createTextVNode(toDisplayString(action.label), 1 /* TEXT */)
              ]),
              _: 2 /* DYNAMIC */
            }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick", "customClass", "bgColor"]))
          }), 128 /* KEYED_FRAGMENT */))
        ]))
  ]))
}

script.render = render;
script.__file = "src/components/TsNavigation/bottomBar.vue";

export { script$2 as a, script$1 as b, script as c, script$3 as s };
