import{g as a}from"./index-Dtu68Mmq.chunk.mjs";import{A as r}from"./AvatarWrapper-CXaRHwzj.chunk.mjs";import{u as o}from"./MediaHandler.provider-BJ1SsG4D.chunk.mjs";import{n as i}from"./_plugin-vue2_normalizer-wd1ZAbRr.chunk.mjs";import"./modulepreload-polyfill-nb9XBeg7.chunk.mjs";import"./emoji-picker-DlAAdvrL.chunk.mjs";import"./vue.runtime.esm-C7aVrvtW.chunk.mjs";import"./NcColorPicker-CXHUHxQL.chunk.mjs";import"./index-DqP6CuPc.chunk.mjs";import"./NcLoadingIcon-CHw5fok5.chunk.mjs";import"./NcCheckboxRadioSwitch-ip_mRd2T-kNk9kCSa.chunk.mjs";import"./NcNoteCard-ChweF_5Q-DZCruKzr.chunk.mjs";import"./index-DfiDB3im.chunk.mjs";import"./index-_QHNqdwt.chunk.mjs";import"./logger-Bu78VaEB.chunk.mjs";const u={name:"GuestNameDialog",components:{AvatarWrapper:r},mixins:[o],props:{session:{type:Object,required:!0}},data(){return{guestName:"",guestNameBuffered:""}},computed:{avatarUrl(){const e=a("/avatar/guest/{user}/{size}",{user:this.guestNameBuffered,size:32});return window.location.protocol+"//"+window.location.host+e}},beforeMount(){this.guestName=this.$syncService.guestName,this.updateBufferedGuestName()},methods:{setGuestName(){const e=this.$syncService.guestName;this.$syncService.updateSession(this.guestName).then(()=>{localStorage.setItem("nick",this.guestName),this.updateBufferedGuestName()}).catch(t=>{this.guestName=e})},updateBufferedGuestName(){this.guestNameBuffered=this.guestName}}};var m=function(){var e=this,t=e._self._c;return t("form",{staticClass:"guest-name-dialog",attrs:{title:e.t("text","Enter your name so other people can see who is editing")},on:{submit:function(s){return s.preventDefault(),e.setGuestName()}}},[t("label",[t("AvatarWrapper",{attrs:{session:e.session,size:32}})],1),t("input",{directives:[{name:"model",rawName:"v-model",value:e.guestName,expression:"guestName"}],attrs:{type:"text","aria-label":e.t("text","Edit guest name"),placeholder:e.t("text","Guest")},domProps:{value:e.guestName},on:{input:function(s){s.target.composing||(e.guestName=s.target.value)}}}),t("input",{staticClass:"icon-confirm",attrs:{type:"submit","aria-label":e.t("text","Save guest name"),value:""}})])},n=[],p=i(u,m,n,!1,null,"b4bfe8cd");const z=p.exports;export{z as default};
//# sourceMappingURL=GuestNameDialog-DsrxIxAK.chunk.mjs.map
