import w from"./BaseConfig.0466b450.js";import{M as x}from"./index.dfdc0704.js";import{S as h}from"./index.de7bcb5e.js";import{d as S,r as B,p as A,c as r,e as m,f as v,h as a,i as n,u as l,k as p,A as f,q as z,m as _,y as N}from"./index.0308b213.js";const T={class:"location-search-config"},M=_("\u666E\u901A\u6309\u94AE"),q=_("\u5BA2\u670D\u6309\u94AE"),L=_("\u9009\u62E9\u7B2C\u4E09\u65B9\u94FE\u63A5"),P=_("\u56FE\u7247"),R=_("\u80CC\u666F\u8272"),J=S({props:{config:null},emits:["update:config","update"],setup(c,{emit:g}){const C=c;let e=B({type:1,url:"",image_type:1,text:"",color:"",font_color:"",font_size:14,image:"",width:"",height:"",left:0,top:0});A(()=>C.config,u=>{console.log("config.value",u),u&&N(()=>{e.value.type=u.type,e.value.url=u.url,e.value.image_type=u.image_type,e.value.text=u.text,e.value.color=u.color,e.value.font_color=u.font_color,e.value.image=u.image,e.value.width=u.width,e.value.height=u.height,e.value.left=u.left,e.value.top=u.top})},{immediate:!0}),A(e.value,u=>{console.log("\u4FEE\u6539\u4E86"),g("update:config",u),g("update",u)});let s=B(!1);const F=()=>{s.value=!0},b=u=>{console.log("val",u),u.type==1?e.value.url=u.miniProgram:u.type==2?e.value.url=u.webview:u.type==3&&(e.value.url=u.phone)},D=u=>{console.log("val",u),e.value.url=u};return(u,o)=>{const V=r("el-radio"),E=r("el-radio-group"),d=r("el-form-item"),k=r("el-button"),i=r("el-input"),y=r("el-color-picker"),U=r("el-form");return m(),v("div",T,[a(w,{title:"\u60AC\u6D6E\u6309\u94AE",desc:"\u5BA2\u670D\u6309\u94AE\u6CBF\u7528\u4EE3\u7406\u7684\u5BA2\u670D\u8BBE\u7F6E"},{default:n(()=>[a(U,{"label-width":"140px"},{default:n(()=>[a(d,{label:"\u60AC\u6D6E\u6309\u94AE\u7C7B\u578B"},{default:n(()=>[a(E,{modelValue:l(e).type,"onUpdate:modelValue":o[0]||(o[0]=t=>l(e).type=t)},{default:n(()=>[a(V,{label:1},{default:n(()=>[M]),_:1}),a(V,{label:2},{default:n(()=>[q]),_:1})]),_:1},8,["modelValue"])]),_:1}),l(e).type==1?(m(),p(d,{key:0,label:"\u8DF3\u8F6C\u8DEF\u5F84"},{default:n(()=>[a(i,{modelValue:l(e).url,"onUpdate:modelValue":o[1]||(o[1]=t=>l(e).url=t)},{append:n(()=>[a(k,{type:"primary",onClick:F},{default:n(()=>[L]),_:1})]),_:1},8,["modelValue"])]),_:1})):f("",!0),a(d,null,{default:n(()=>[a(l(h),{url:l(e).url,modelValue:l(s),"onUpdate:modelValue":o[2]||(o[2]=t=>z(s)?s.value=t:s=t),onConfirmAll:b,onChange:D},null,8,["url","modelValue"])]),_:1}),l(e).image_type?(m(),p(d,{key:1,label:"\u6309\u94AE\u7C7B\u578B"},{default:n(()=>[a(E,{modelValue:l(e).image_type,"onUpdate:modelValue":o[3]||(o[3]=t=>l(e).image_type=t)},{default:n(()=>[a(V,{label:1},{default:n(()=>[P]),_:1}),a(V,{label:2},{default:n(()=>[R]),_:1})]),_:1},8,["modelValue"])]),_:1})):f("",!0),l(e).image_type==2?(m(),p(d,{key:2,label:"\u6587\u5B57"},{default:n(()=>[a(i,{modelValue:l(e).text,"onUpdate:modelValue":o[4]||(o[4]=t=>l(e).text=t)},null,8,["modelValue"])]),_:1})):f("",!0),l(e).image_type==2?(m(),p(d,{key:3,label:"\u80CC\u666F\u8272"},{default:n(()=>[a(y,{modelValue:l(e).color,"onUpdate:modelValue":o[5]||(o[5]=t=>l(e).color=t)},null,8,["modelValue"])]),_:1})):f("",!0),l(e).image_type==2?(m(),p(d,{key:4,label:"\u5B57\u4F53\u989C\u8272"},{default:n(()=>[a(y,{modelValue:l(e).font_color,"onUpdate:modelValue":o[6]||(o[6]=t=>l(e).font_color=t)},null,8,["modelValue"])]),_:1})):f("",!0),l(e).image_type==2?(m(),p(d,{key:5,label:"\u5B57\u4F53\u5927\u5C0F"},{default:n(()=>[a(i,{modelValue:l(e).font_size,"onUpdate:modelValue":o[7]||(o[7]=t=>l(e).font_size=t)},null,8,["modelValue"])]),_:1})):f("",!0),l(e).image_type==1?(m(),p(d,{key:6,label:"\u56FE\u7247"},{default:n(()=>[a(x,{modelValue:l(e).image,"onUpdate:modelValue":o[8]||(o[8]=t=>l(e).image=t),limit:1},null,8,["modelValue"])]),_:1})):f("",!0),a(d,{label:"\u6309\u94AE\u5BBD\u5EA6"},{default:n(()=>[a(i,{modelValue:l(e).width,"onUpdate:modelValue":o[9]||(o[9]=t=>l(e).width=t)},null,8,["modelValue"])]),_:1}),a(d,{label:"\u6309\u94AE\u9AD8\u5EA6"},{default:n(()=>[a(i,{modelValue:l(e).height,"onUpdate:modelValue":o[10]||(o[10]=t=>l(e).height=t)},null,8,["modelValue"])]),_:1}),a(d,{label:"\u6309\u94AE\u4F4D\u7F6E(\u8DDD\u79BB\u5DE6\u4FA7)"},{default:n(()=>[a(i,{modelValue:l(e).left,"onUpdate:modelValue":o[11]||(o[11]=t=>l(e).left=t)},null,8,["modelValue"])]),_:1}),a(d,{label:"\u6309\u94AE\u4F4D\u7F6E(\u8DDD\u79BB\u9876\u90E8)"},{default:n(()=>[a(i,{modelValue:l(e).top,"onUpdate:modelValue":o[12]||(o[12]=t=>l(e).top=t)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})])}}});export{J as _};
