"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Vue = require("vue");
const MemberInfo = require("../MemberItemCommon/MemberInfo.vue.js");
const index = require("../MemberControl/index.js");
const MemberInvite = require("../MemberInvite/MemberInvite.vue.js");
const useMemberItemHooks = require("./useMemberItemHooks.js");
const room = require("../../../constants/room.js");
const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
  __name: "indexPC",
  props: {
    userInfo: {},
    userCurrentStatus: {}
  },
  setup(__props) {
    const props = __props;
    const { isMemberControlAccessible, openMemberControl, closeMemberControl } = useMemberItemHooks.default(props.userInfo);
    const showMemberControl = Vue.ref(false);
    Vue.watch(isMemberControlAccessible, (accessible) => {
      showMemberControl.value = accessible;
    });
    return (_ctx, _cache) => {
      return Vue.openBlock(), Vue.createElementBlock("div", {
        class: "member-item-container",
        onMouseenter: _cache[0] || (_cache[0] = //@ts-ignore
        (...args) => Vue.unref(openMemberControl) && Vue.unref(openMemberControl)(...args)),
        onMouseleave: _cache[1] || (_cache[1] = //@ts-ignore
        (...args) => Vue.unref(closeMemberControl) && Vue.unref(closeMemberControl)(...args))
      }, [
        Vue.withDirectives(Vue.createVNode(MemberInfo.default, {
          "user-info": props.userInfo,
          "show-state-icon": !showMemberControl.value
        }, null, 8, ["user-info", "show-state-icon"]), [
          [Vue.vShow, props.userCurrentStatus !== Vue.unref(room.USERS_STATUS).NOT_ENTER]
        ]),
        Vue.withDirectives(Vue.createVNode(Vue.unref(index.default), {
          "show-member-control": showMemberControl.value,
          "user-info": props.userInfo
        }, null, 8, ["show-member-control", "user-info"]), [
          [
            Vue.vShow,
            showMemberControl.value && props.userCurrentStatus !== Vue.unref(room.USERS_STATUS).NOT_ENTER
          ]
        ]),
        Vue.withDirectives(Vue.createVNode(MemberInvite.default, {
          "user-info": props.userInfo
        }, null, 8, ["user-info"]), [
          [Vue.vShow, props.userCurrentStatus === Vue.unref(room.USERS_STATUS).NOT_ENTER]
        ])
      ], 32);
    };
  }
});
exports.default = _sfc_main;
