import{u as S}from"./vue-i18n-90d534a9.js";import{u as $}from"./vue-router-7f882520.js";import{l as V,I as m,q as d}from"./index-ae60edf9.js";import{A as N}from"./index-b5d57c09.js";import{_ as R}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{_ as u}from"./index.vue_vue_type_script_setup_true_lang-adc75212.js";import{u as q}from"./useCurrentMemberRole-f0ed520c.js";import{M as x}from"./data-2e062955.js";import{c as L,A as a}from"./open-im-sdk-wasm-f19f04ec.js";import{d as T,w as U,b as B,l as F,k as E,o as h,c as g,$ as s,u as n,P as A,a as K}from"./@vue-cb50a1c4.js";import"./@intlify-1c0af683.js";import"./dayjs-4460abc8.js";import"./@amap-aca98dec.js";import"./pinia-de4079f2.js";import"./axios-7d5a0a64.js";import"./form-data-497f8b5e.js";import"./uuid-a960c1f4.js";import"./date-fns-f56f60e6.js";import"./@babel-7fd5df1e.js";import"./mitt-f7ef348c.js";import"./@vueuse-19adab01.js";import"./livekit-client-ca552de3.js";import"./@livekit-3058dbe8.js";import"./loglevel-e40a507a.js";import"./rxjs-2154ddb2.js";import"./tslib-8dbab242.js";import"./@vuemap-5ebdc63e.js";import"./lodash-es-91418b19.js";import"./index-597402db.js";import"./arrows_left-f963ef62.js";import"./index-ce3b9548.js";import"./back-099fa84a.js";const O={class:"page_container"},P={key:0,class:"mx-[10px] mt-[10px] overflow-hidden rounded-md bg-white"},j={class:"mx-[10px] mt-[10px] overflow-hidden rounded-md bg-white"},z={key:1,class:"mx-[10px] mt-[10px] overflow-hidden rounded-md bg-white"},ye=T({__name:"index",setup(H){const{t:i,locale:k}=S(),I=$(),{isNomal:v,isOwner:w}=q(),t=V(),l=[{name:i("applyRequired")},{name:i("allRequired")},{name:i("notRequired")}];U(k,()=>{l[0].name=i("applyRequired"),l[1].name=i("allRequired"),l[2].name=i("notRequired")});const p=B(!1),r=F({mute:!1,look:!1,friend:!1}),C=E(()=>l[t.storeCurrentGroupInfo.needVerification].name),_=e=>{r.look=!0,m.setGroupLookMemberInfo({rule:e?a.NotAllowed:a.Allowed,groupID:t.storeCurrentConversation.groupID}).catch(o=>d({error:o})).finally(()=>r.look=!1)},b=e=>{r.friend=!0,m.setGroupApplyMemberFriend({rule:e?a.NotAllowed:a.Allowed,groupID:t.storeCurrentConversation.groupID}).catch(o=>d({error:o})).finally(()=>r.friend=!1)},M=e=>{r.mute=!0,m.changeGroupMute({isMute:e,groupID:t.storeCurrentConversation.groupID}).catch(o=>d({error:o})).finally(()=>r.mute=!1)},y=()=>{v.value||(p.value=!0)},D=async(e,o)=>{let f;try{await m.setGroupVerification({groupID:t.storeCurrentConversation.groupID,verification:o})}catch(c){c=c}p.value=!1,d({error:f})},G=()=>{I.push({path:"groupMemberList",state:{groupID:t.storeCurrentGroupInfo.groupID,action:x.Transfer}})};return(e,o)=>{const f=N;return h(),g("div",O,[s(R,{title:e.$t("groupManage")},null,8,["title"]),n(w)?(h(),g("div",P,[s(u,{title:e.$t("allMute"),"show-switch":"",loading:r.mute,checked:n(t).storeCurrentGroupInfo.status===n(L).Muted,onUpdateValue:M},null,8,["title","loading","checked"])])):A("",!0),K("div",j,[s(u,{title:e.$t("notAllowLookMemberInfo"),"show-switch":"",loading:r.look,checked:n(t).storeCurrentGroupInfo.lookMemberInfo===n(a).NotAllowed,onUpdateValue:_},null,8,["title","loading","checked"]),s(u,{title:e.$t("notAllowApplyMember"),"show-switch":"",loading:r.friend,checked:n(t).storeCurrentGroupInfo.applyMemberFriend===n(a).NotAllowed,onUpdateValue:b},null,8,["title","loading","checked"]),s(u,{title:e.$t("groupAccess"),"sub-title":n(C),onClickItem:y},null,8,["title","sub-title"])]),n(w)?(h(),g("div",z,[s(u,{title:e.$t("groupTransfer"),onClick:G},null,8,["title"])])):A("",!0),s(f,{show:p.value,"onUpdate:show":o[0]||(o[0]=c=>p.value=c),actions:l,onSelect:D,"cancel-text":e.$t("buttons.cancel")},null,8,["show","cancel-text"])])}}});export{ye as default};
