import{c as C,d as V,R as B,g as I,f as L,O as P,V as O,h as l,i as e,j as c,u as o,E as $,k as p,W as f,Y as x,t as i,P as D,m as _,Z as N,n as z,F as k,r as M,D as b,o as d}from"./index-BLNwRZQA.js";import{C as E,a as F}from"./clock-XZ06YeQx.js";/**
 * @license lucide-vue-next v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Q=C("MailIcon",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
 * @license lucide-vue-next v0.468.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const R=C("SendIcon",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),W={class:"max-w-7xl mx-auto px-6 py-16"},A={class:"grid grid-cols-1 lg:grid-cols-5 gap-10 mb-16"},K={class:"lg:col-span-3"},Z={class:"bg-card rounded-xl shadow-card p-6 md:p-8"},q={key:0,class:"flex flex-col items-center justify-center py-16"},G={class:"w-16 h-16 rounded-full bg-success/15 flex items-center justify-center mb-5"},J={class:"space-y-1.5"},Y={class:"space-y-1.5"},H={class:"grid grid-cols-1 md:grid-cols-2 gap-5"},X={class:"space-y-1.5"},ee={class:"space-y-1.5"},te={class:"space-y-1.5"},se=["disabled"],oe={class:"lg:col-span-2 space-y-5"},ne={class:"bg-card rounded-xl shadow-card p-5"},re={class:"flex items-start gap-4"},le={class:"w-10 h-10 rounded-lg bg-primary/15 flex items-center justify-center shrink-0"},de=["href"],ae={key:0,class:"bg-card rounded-xl shadow-card p-5"},ie={class:"flex items-start gap-4"},ue={class:"w-10 h-10 rounded-lg bg-primary/15 flex items-center justify-center shrink-0"},ce=["href"],me={class:"bg-card rounded-xl shadow-card p-5"},pe={class:"flex items-start gap-4"},fe={class:"w-10 h-10 rounded-lg bg-primary/15 flex items-center justify-center shrink-0"},xe={class:"text-sm text-muted-foreground leading-relaxed"},ge={class:"bg-card rounded-xl shadow-card p-5"},ye={class:"flex items-start gap-4"},be={class:"w-10 h-10 rounded-lg bg-primary/15 flex items-center justify-center shrink-0"},he={class:"text-sm font-medium text-foreground mt-0.5"},ve={key:1,class:"bg-card rounded-xl shadow-card p-5"},we=["src","alt"],_e={class:"text-xs font-medium text-foreground mt-2"},ke={class:"text-[11px] text-muted-foreground"},Me={class:"bg-primary/10 rounded-xl p-5"},Ce={class:"space-y-2 text-sm text-muted-foreground"},Te={class:"bg-card rounded-xl shadow-card overflow-hidden"},Ve=V({__name:"ContactView",setup(Se){const a=B(),w=I(),h=L().filter(r=>r.imageUrl),v=b(null);let m=null;const u={lat:22.766456,lng:108.49675},n=b({name:"",phone:"",email:"",company:"",description:""}),g=b(!1),y=b(!1);async function T(){g.value=!0;try{(await fetch("/api/inquiries",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.value)})).ok?y.value=!0:alert("鎻愪氦澶辫触锛岃绋嶅悗閲嶈瘯")}catch{y.value=!0}g.value=!1}function S(){y.value=!1,n.value={name:"",phone:"",email:"",company:"",description:""}}function j(){return new Promise(r=>{if(window.TMap){r();return}const t=document.createElement("script");t.src="https://map.qq.com/api/gljs?v=1.exp&key=B6EBZ-ZAGCQ-7Q25B-BC6BR-UOWUE-TKFRU",t.onload=()=>r(),t.onerror=()=>{console.error("鑵捐鍦板浘 JSAPI GL 鍔犺浇澶辫触锛氳妫€鏌ョ綉缁滄垨 Key 鏄惁鏈夋晥"),r()},document.head.appendChild(t)})}function U(){if(!v.value)return;if(!window.TMap){console.error("TMap 鏈姞杞芥垚鍔燂紝鍦板浘鏃犳硶鍒濆鍖栥€傝妫€鏌� Key 鏄惁鏈夋晥銆佹槸鍚﹀凡鍔犲叆鍩熷悕鐧藉悕鍗�");return}m=new window.TMap.Map(v.value,{center:new window.TMap.LatLng(u.lat,u.lng),zoom:17,viewMode:"2D"});const r=new window.TMap.MultiMarker({id:"marker-layer",map:m,styles:{marker:new window.TMap.MarkerStyle({width:32,height:44,anchor:{x:16,y:44}})},geometries:[{id:"company",styleId:"marker",position:new window.TMap.LatLng(u.lat,u.lng)}]}),t=new window.TMap.InfoWindow({content:`<div style="padding:8px 12px;font-size:14px;"><b>${w.name}</b><br/>${w.address}</div>`,position:new window.TMap.LatLng(u.lat,u.lng)});r.on("click",()=>{t.open()}),t.open()}return P(async()=>{await j(),U()}),O(()=>{m&&(m.destroy(),m=null)}),(r,t)=>(d(),l("main",W,[t[23]||(t[23]=e("section",{class:"text-center mb-16"},[e("h1",{class:"text-3xl md:text-4xl font-bold text-foreground mb-3"},"鑱旂郴鎴戜滑"),e("p",{class:"text-base text-muted-foreground max-w-lg mx-auto"},"鏈熷緟涓庢偍鐨勫悎浣滐紝璇风暀涓嬫偍鐨勯渶姹傦紝鎴戜滑灏嗗湪绗竴鏃堕棿涓庢偍鍙栧緱鑱旂郴")],-1)),e("div",A,[e("div",K,[e("div",Z,[t[12]||(t[12]=e("h2",{class:"text-lg font-semibold text-foreground mb-1"},"鍦ㄧ嚎鍜ㄨ",-1)),t[13]||(t[13]=e("p",{class:"text-sm text-muted-foreground mb-6"},"濉啓浠ヤ笅淇℃伅锛屾垜浠殑椤鹃棶灏嗗敖蹇笌鎮ㄨ仈绯�",-1)),y.value?(d(),l("div",q,[e("div",G,[c(o(E),{class:"w-8 h-8 text-success"})]),t[5]||(t[5]=e("h3",{class:"text-xl font-semibold text-foreground mb-2"},"鎻愪氦鎴愬姛",-1)),t[6]||(t[6]=e("p",{class:"text-sm text-muted-foreground text-center max-w-sm"},"鎰熻阿鎮ㄧ殑鍜ㄨ锛佹垜浠殑椤鹃棶灏嗗湪 1 涓伐浣滄棩鍐呬笌鎮ㄨ仈绯伙紝璇蜂繚鎸佺數璇濈晠閫氥€�",-1)),e("button",{onClick:S,class:"mt-6 text-sm text-primary hover:underline"},"缁х画鎻愪氦")])):(d(),l("form",{key:1,onSubmit:$(T,["prevent"]),class:"space-y-5"},[e("div",J,[t[7]||(t[7]=e("label",{for:"contact-name",class:"text-sm font-medium text-foreground"},[p("濮撳悕 "),e("span",{class:"text-destructive"},"*")],-1)),f(e("input",{id:"contact-name","onUpdate:modelValue":t[0]||(t[0]=s=>n.value.name=s),required:"",placeholder:"璇疯緭鍏ユ偍鐨勫鍚�",class:"w-full bg-muted border-none rounded-md px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-primary/30 transition-colors"},null,512),[[x,n.value.name]])]),e("div",Y,[t[8]||(t[8]=e("label",{for:"contact-phone",class:"text-sm font-medium text-foreground"},[p("鑱旂郴鐢佃瘽 "),e("span",{class:"text-destructive"},"*")],-1)),f(e("input",{id:"contact-phone","onUpdate:modelValue":t[1]||(t[1]=s=>n.value.phone=s),type:"tel",required:"",placeholder:"璇疯緭鍏ユ偍鐨勮仈绯荤數璇�",class:"w-full bg-muted border-none rounded-md px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-primary/30 transition-colors"},null,512),[[x,n.value.phone]])]),e("div",H,[e("div",X,[t[9]||(t[9]=e("label",{for:"contact-email",class:"text-sm font-medium text-foreground"},"閭",-1)),f(e("input",{id:"contact-email","onUpdate:modelValue":t[2]||(t[2]=s=>n.value.email=s),type:"email",placeholder:"閫夊~",class:"w-full bg-muted border-none rounded-md px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-primary/30 transition-colors"},null,512),[[x,n.value.email]])]),e("div",ee,[t[10]||(t[10]=e("label",{for:"contact-company",class:"text-sm font-medium text-foreground"},"鍏徃鍚嶇О",-1)),f(e("input",{id:"contact-company","onUpdate:modelValue":t[3]||(t[3]=s=>n.value.company=s),placeholder:"閫夊~",class:"w-full bg-muted border-none rounded-md px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-primary/30 transition-colors"},null,512),[[x,n.value.company]])])]),e("div",te,[t[11]||(t[11]=e("label",{for:"contact-desc",class:"text-sm font-medium text-foreground"},[p("闇€姹傛弿杩� "),e("span",{class:"text-destructive"},"*")],-1)),f(e("textarea",{id:"contact-desc","onUpdate:modelValue":t[4]||(t[4]=s=>n.value.description=s),required:"",rows:"5",placeholder:"璇风畝瑕佹弿杩版偍鐨勯渶姹�",class:"w-full bg-muted border-none rounded-md px-3 py-2.5 text-sm text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-primary/30 transition-colors resize-none min-h-[120px]"},null,512),[[x,n.value.description]])]),e("button",{type:"submit",disabled:g.value,class:"inline-flex items-center gap-2 bg-primary text-primary-foreground px-6 py-2.5 rounded-lg text-sm font-medium hover:bg-primary/90 transition-colors shadow-float disabled:opacity-50"},[c(o(R),{class:"w-4 h-4"}),p(i(g.value?"鎻愪氦涓�...":"鎻愪氦鍜ㄨ"),1)],8,se)],32))])]),e("div",oe,[e("div",ne,[e("div",re,[e("div",le,[c(o(D),{class:"w-5 h-5 text-primary"})]),e("div",null,[t[14]||(t[14]=e("h3",{class:"text-sm font-semibold text-foreground mb-1"},"鑱旂郴鐢佃瘽",-1)),t[15]||(t[15]=e("p",{class:"text-sm text-muted-foreground"},"鐩存帴鎷ㄦ墦鎴戜滑鐨勬湇鍔$儹绾�",-1)),e("a",{href:`tel:${o(a).phone}`,class:"text-base font-semibold text-primary mt-1 inline-block hover:underline"},i(o(a).phone),9,de)])])]),o(a).email?(d(),l("div",ae,[e("div",ie,[e("div",ue,[c(o(Q),{class:"w-5 h-5 text-primary"})]),e("div",null,[t[16]||(t[16]=e("h3",{class:"text-sm font-semibold text-foreground mb-1"},"鐢靛瓙閭",-1)),e("a",{href:`mailto:${o(a).email}`,class:"text-sm text-primary hover:underline"},i(o(a).email),9,ce)])])])):_("",!0),e("div",me,[e("div",pe,[e("div",fe,[c(o(N),{class:"w-5 h-5 text-primary"})]),e("div",null,[t[17]||(t[17]=e("h3",{class:"text-sm font-semibold text-foreground mb-1"},"鍏徃鍦板潃",-1)),e("p",xe,i(o(a).address),1)])])]),e("div",ge,[e("div",ye,[e("div",be,[c(o(F),{class:"w-5 h-5 text-primary"})]),e("div",null,[t[18]||(t[18]=e("h3",{class:"text-sm font-semibold text-foreground mb-1"},"宸ヤ綔鏃堕棿",-1)),e("p",he,i(o(a).workingHours),1)])])]),o(h).length>0?(d(),l("div",ve,[t[19]||(t[19]=e("h3",{class:"text-sm font-semibold text-foreground mb-4"},"鎵爜鍏虫敞",-1)),e("div",{class:z(`grid gap-5 ${o(h).length>1?"grid-cols-2":"grid-cols-1"}`)},[(d(!0),l(k,null,M(o(h),s=>(d(),l("div",{key:s.id,class:"text-center"},[e("img",{src:s.imageUrl,alt:s.label,class:"w-full max-w-[140px] mx-auto rounded-lg object-cover border border-border/20"},null,8,we),e("p",_e,i(s.label),1),e("p",ke,i(s.description),1)]))),128))],2)])):_("",!0),e("div",Me,[t[21]||(t[21]=e("h3",{class:"text-sm font-semibold text-foreground mb-2"},"蹇€熷搷搴旀壙璇�",-1)),e("ul",Ce,[(d(!0),l(k,null,M(o(a).responsePromises,s=>(d(),l("li",{key:s,class:"flex items-start gap-2"},[t[20]||(t[20]=e("span",{class:"w-1.5 h-1.5 rounded-full bg-primary mt-1.5 shrink-0"},null,-1)),p(i(s),1)]))),128))])])])]),e("section",null,[t[22]||(t[22]=e("h2",{class:"text-lg font-semibold text-foreground mb-4"},"鍏徃浣嶇疆",-1)),e("div",Te,[e("div",{ref_key:"mapContainer",ref:v,class:"relative w-full h-[360px] bg-muted"},null,512)])])]))}});export{Ve as default};