import{u as v}from"./vue-i18n-90d534a9.js";import{u as h}from"./vue-router-7f882520.js";import{k as b,I as k,be as g,q as l,_ as S}from"./index-ae60edf9.js";import{F as x}from"./index-fc073ec7.js";import{_ as D}from"./index.vue_vue_type_script_setup_true_lang-1170722e.js";import{d as C,b as F,o as V,c as B,$ as p,bj as N,a as n,aX as w,u as d,aD as y,aA as R}from"./@vue-cb50a1c4.js";import"./@intlify-1c0af683.js";import"./open-im-sdk-wasm-f19f04ec.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"./use-id-22cfdfcf.js";import"./index-597402db.js";import"./arrows_left-f963ef62.js";const T=e=>(y("data-v-58e415cf"),e=e(),R(),e),U={class:"page_container !bg-white"},$=["disabled"],q={class:"mx-2"},j={class:"rounded-lg"},A=T(()=>n("div",{class:"tips"}," 好名字可以让你的朋友更容易记住你。 ",-1)),E=C({__name:"index",props:{friendInfo:null},setup(e){var m;const o=e,{t}=v(),i=b(),c=h(),s=F(o.friendInfo?(m=o.friendInfo)==null?void 0:m.remark:i.storeSelfInfo.nickname),f=o.friendInfo?t("remark"):t("updateNickName"),u=()=>{let a;o.friendInfo?a=k.setFriendRemark({toUserID:o.friendInfo.userID,remark:s.value}):a=g({nickname:s.value,userID:i.storeSelfInfo.userID}),a.then(()=>{i.getSelfInfoFromReq(),l({message:t("messageTip.nomalSuccess"),onClose:c.back})}).catch(r=>l({message:t("messageTip.nomalFailed"),error:r}))};return(a,r)=>{const _=x;return V(),B("div",U,[p(D,{title:d(f)},{default:N(()=>[n("div",{class:"btn",disabled:!s.value&&!e.friendInfo,onClick:u},w(d(t)("buttons.save")),9,$)]),_:1},8,["title"]),n("div",q,[n("div",j,[p(_,{class:"boderb1",modelValue:s.value,"onUpdate:modelValue":r[0]||(r[0]=I=>s.value=I),maxlength:16,label:"",placeholder:a.$t("placeholder.pleaseInput")},null,8,["modelValue","placeholder"])])]),A])}}});const ue=S(E,[["__scopeId","data-v-58e415cf"]]);export{ue as default};
