<script setup lang="ts">
import CirclePage from "@/pages/learningPath/circlePage/CirclePage.vue";
import * as log from "loglevel";
import { computed, onMounted } from "vue";
import { useCourseSessionDetailQuery } from "@/composables";

const props = defineProps<{
  userId: string;
  courseSlug: string;
  circleSlug: string;
}>();

log.debug("CockpitUserCirclePage created", props.userId, props.circleSlug);

onMounted(async () => {
  log.debug("CockpitUserCirclePage mounted");
});

const { findUser } = useCourseSessionDetailQuery();

const user = computed(() => {
  return findUser(props.userId);
});
</script>

<template>
  <CirclePage
    v-if="user"
    :course-slug="props.courseSlug"
    :circle-slug="props.circleSlug"
    :profile-user="user"
    :readonly="true"
  ></CirclePage>
</template>

<style scoped></style>
