import{u as L}from"./vue-router-7f882520.js";import{_ as g}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{b as C}from"./back-099fa84a.js";import{s as E}from"./select-4d43c99e.js";import{d as v,o as a,c as n,a as i,u as m,P as f,aX as u,an as k,b as d,k as w,j as N,$ as I,bj as M,F as T,aI as O,O as $}from"./@vue-cb50a1c4.js";import{P as _,_ as B}from"./index-ae60edf9.js";import{v as x}from"./visibilityList-34a3a1e8.js";import{C as P}from"./data-7f4000cb.js";import"./index-597402db.js";import"./arrows_left-f963ef62.js";import"./open-im-sdk-wasm-f19f04ec.js";import"./dayjs-4460abc8.js";import"./@amap-aca98dec.js";import"./vue-i18n-90d534a9.js";import"./@intlify-1c0af683.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";const R={class:"flex items-center"},U={class:"h-[24px] w-[24px]"},V=["src"],j={class:"ml-3 flex flex-col items-start"},J={class:"text-sm text-sub-text"},A={class:"text-sm text-primary"},D=["src"],F=v({__name:"SettingItem",props:{title:null,arrow:{type:Boolean},isSelect:{type:Boolean},border:{type:Boolean},subTitle:null,selectList:null},setup(r){return(p,s)=>(a(),n("div",{class:k(["flex items-center justify-between bg-white px-4 py-3",{"border-b":r.border}])},[i("div",R,[i("div",U,[r.isSelect?(a(),n("img",{key:0,class:"h-[24px] w-[24px]",src:m(E)},null,8,V)):f("",!0)]),i("div",j,[i("div",null,u(r.title),1),i("div",J,u(r.subTitle),1),i("div",A,u(r.selectList),1)])]),r.arrow?(a(),n("img",{key:0,class:"h-[24px] w-[24px]",src:m(C)},null,8,D)):f("",!0)],2))}}),z={class:"page_container"},G={class:"mt-[10px] !bg-white"},W=v({name:"momentsVisibility"}),X=v({...W,setup(r){const p=L(),s=d(0),o=d([]),l=d([]),h=w(()=>{if(s.value>1){const t=l.value.map(e=>e.groupName);return[...o.value.map(e=>e.nickname),...t].join("、")}return""});N(()=>{_.on("MOMENTS_SELECT_PERMISSION_USER",t=>{const c=JSON.parse(t);l.value=c.groupList,o.value=c.userList}),_.on("MOMENTS_RELEASE_INIT",()=>{S()})});const b=()=>{_.emit("MOMENTS_UPDATE_PERMISSION",JSON.stringify({idx:s.value,userList:o.value,groupList:l.value})),p.back()},S=()=>{s.value=x[0].idx,o.value=[],l.value=[]},y=t=>{t!==s.value&&(o.value=[]),s.value=t,t>1?p.push({path:"chooseUser",state:{chooseType:P.MomentsPermissionUser,prevCheckedUserList:JSON.stringify([...o.value,...o.value])}}):o.value=[]};return(t,c)=>(a(),n("div",z,[I(g,{title:t.$t("momentsVisibilityList.whoCanWtach")},{default:M(()=>[i("div",{onClick:b},u(t.$t("buttons.confirm")),1)]),_:1},8,["title"]),i("div",G,[(a(!0),n(T,null,O(m(x),e=>(a(),$(F,{title:e.title,"sub-title":e.subTitle,border:e.border,arrow:e.arrow,isSelect:e.idx===s.value,onClick:q=>y(e.idx),selectList:e.idx===s.value?m(h):""},null,8,["title","sub-title","border","arrow","isSelect","onClick","selectList"]))),256))])]))}});const Ee=B(X,[["__scopeId","data-v-97197ee4"]]);export{Ee as default};
