import { defineComponent, openBlock, createElementBlock, Fragment, renderList, unref, createVNode, createElementVNode, toDisplayString, isRef, withCtx, createTextVNode, withDirectives, createBlock, createCommentVNode, vShow } from "vue";
import useRoomInvite from "./useRoomInviteHooks.mjs";
import SvgIcon from "../common/base/SvgIcon.vue.mjs";
import TuiButton from "../common/base/Button.vue.mjs";
import Contacts from "../ScheduleConference/Contacts.vue.mjs";
import SuccessIcon from "../common/icons/SuccessIcon.vue.mjs";
import copyIcon from "../common/icons/CopyIcon.vue.mjs";
import Dialog from "../common/base/Dialog/index.mjs";
const _hoisted_1 = { class: "invite-container" };
const _hoisted_2 = ["onClick"];
const _hoisted_3 = { class: "invite-title" };
const _hoisted_4 = { class: "invite-member" };
const _hoisted_5 = { class: "invite-member-container" };
const _hoisted_6 = { class: "invite-member-title" };
const _hoisted_7 = ["title"];
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "indexPC",
  setup(__props) {
    const {
      t,
      invitationFeatureDetails,
      showContacts,
      contactsConfirm,
      contacts,
      remoteEnteredUserList,
      showRoomInvite,
      userId,
      userName,
      conferenceInviteList,
      onCopy,
      copyRoomIdAndRoomLink
    } = useRoomInvite();
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        (openBlock(true), createElementBlock(Fragment, null, renderList(unref(invitationFeatureDetails), (item, index) => {
          return openBlock(), createElementBlock("div", {
            key: index,
            class: "invite-item",
            onClick: ($event) => item.function()
          }, [
            createVNode(SvgIcon, {
              class: "icon",
              icon: item.icon
            }, null, 8, ["icon"]),
            createElementVNode("span", _hoisted_3, toDisplayString(unref(t)(item.text)), 1)
          ], 8, _hoisted_2);
        }), 128)),
        createVNode(Contacts, {
          visible: unref(showContacts),
          contacts: unref(contacts),
          "disabled-list": unref(remoteEnteredUserList),
          onInput: _cache[0] || (_cache[0] = ($event) => showContacts.value = $event),
          onConfirm: unref(contactsConfirm)
        }, null, 8, ["visible", "contacts", "disabled-list", "onConfirm"]),
        createVNode(unref(Dialog), {
          modelValue: unref(showRoomInvite),
          "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => isRef(showRoomInvite) ? showRoomInvite.value = $event : null),
          title: unref(t)("sb invites you to join the conference", { name: unref(userName) || unref(userId) }),
          modal: true,
          "show-close": true,
          "close-on-click-modal": true,
          width: "540px",
          "append-to-body": true,
          "title-icon": SuccessIcon
        }, {
          footer: withCtx(() => [
            createElementVNode("span", null, [
              createVNode(TuiButton, {
                class: "dialog-button",
                size: "default",
                onClick: _cache[1] || (_cache[1] = ($event) => unref(copyRoomIdAndRoomLink)())
              }, {
                default: withCtx(() => [
                  createTextVNode(toDisplayString(unref(t)("Copy the conference number and link")), 1)
                ]),
                _: 1
              })
            ])
          ]),
          default: withCtx(() => [
            createElementVNode("div", _hoisted_4, [
              (openBlock(true), createElementBlock(Fragment, null, renderList(unref(conferenceInviteList), (item) => {
                return withDirectives((openBlock(), createElementBlock("div", {
                  key: item.title
                }, [
                  createElementVNode("div", _hoisted_5, [
                    createElementVNode("span", _hoisted_6, toDisplayString(unref(t)(item.title)), 1),
                    createElementVNode("span", {
                      class: "invite-member-content",
                      title: item.content
                    }, toDisplayString(item.content), 9, _hoisted_7),
                    item.isShowCopyIcon ? (openBlock(), createBlock(SvgIcon, {
                      key: 0,
                      class: "copy",
                      icon: copyIcon,
                      onClick: ($event) => unref(onCopy)(item.content)
                    }, null, 8, ["onClick"])) : createCommentVNode("", true)
                  ])
                ])), [
                  [vShow, item.isVisible]
                ]);
              }), 128))
            ])
          ]),
          _: 1
        }, 8, ["modelValue", "title"])
      ]);
    };
  }
});
export {
  _sfc_main as default
};
