import{u as _}from"./vue-i18n-90d534a9.js";import{u as d}from"./vue-router-7f882520.js";import{I as u,t as f}from"./index-ae60edf9.js";import{u as h}from"./useSendMessage-e9c396f5.js";import{E as g}from"./@vuemap-5ebdc63e.js";import{d as b,o as k,c as A,a as E,$ as a,bj as y,_ as M,aX as S}from"./@vue-cb50a1c4.js";import{B as N}from"./index-e4a7d928.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"./lodash-es-91418b19.js";const v={class:"relative h-full"},C={class:"absolute left-3 right-3 top-3 z-10 flex justify-between text-2xl"},tt=b({__name:"index",setup(I){const t=[history.state.lng,history.state.lat],{t:i}=_(),s=d(),{sendMessage:n}=h(),r=o=>{const e=new AMap.Marker({position:t});o.add(e)},m=()=>{const o={name:i("myLocation"),latng:`${t[1]},${t[0]}`,addr:"",city:"",module:"locationPicker",latitude:t[1],longitude:t[0],url:`https://restapi.amap.com/v3/staticmap?size=600*300&markers=-1,https://cache.amap.com/lbs/static/cuntom_marker1.png,0:${t[0]},${t[1]}&key=39b41b2a48453d7e66007c6f45d26a12`};u.createLocationMessage({description:JSON.stringify(o),longitude:t[0],latitude:t[1]}).then(({data:e})=>{n({message:e}),s.back()})};return(o,e)=>{const c=f,p=N,l=g;return k(),A("div",v,[E("div",C,[a(c,{name:"arrow-left",onClick:o.$router.back},null,8,["onClick"]),a(p,{type:"primary",size:"mini",onClick:m},{default:y(()=>[M(S(o.$t("buttons.send")),1)]),_:1})]),a(l,{center:t,zoom:12,onInit:r})])}}});export{tt as default};
