import{aa as b,d as F,a6 as k,b as g,c as n,e as i,k as E,i as t,u as a,h as o,A as V,f as S,m as _,E as x}from"./index.0308b213.js";const B=r=>b.request({url:"agent/plugin.thirdDelivery.qingyun/getAgentConfig",method:"GET",params:r}),I=r=>b.request({url:"agent/plugin.thirdDelivery.qingyun/setAgentConfig",method:"POST",data:r}),q=_("\u5F00\u542F"),w=_("\u5173\u95ED"),N=_("\u63D0\u4EA4"),P={key:1},U=F({setup(r){const{OpPlatform:d}=k(),e=g({is_open:0,developerId:"",appSecret:""}),v=g({stores:[],areas:[]}),C=()=>{e.stores=v.stores,d.value==="agent"&&I(e).then(u=>{x.success("\u8BBE\u7F6E\u6210\u529F"),c()})},c=()=>{d.value==="agent"&&B().then(u=>{e.is_open=u.data.is_open,e.developerId=u.data.developerId,e.appSecret=u.data.appSecret})};return c(),(u,l)=>{const m=n("el-radio"),h=n("el-radio-group"),p=n("el-form-item"),f=n("el-input"),y=n("el-button"),A=n("el-form"),D=n("el-card");return i(),E(D,{shadow:"always",style:{"margin-top":"20px"}},{default:t(()=>[a(d)=="agent"?(i(),E(A,{key:0,"label-width":"120px"},{default:t(()=>[o(p,{label:"\u9752\u4E91\u805A\u4FE1"},{default:t(()=>[o(h,{modelValue:a(e).is_open,"onUpdate:modelValue":l[0]||(l[0]=s=>a(e).is_open=s)},{default:t(()=>[o(m,{label:1},{default:t(()=>[q]),_:1}),o(m,{label:0},{default:t(()=>[w]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(p,{label:"\u5F00\u53D1\u8005ID"},{default:t(()=>[o(f,{modelValue:a(e).developerId,"onUpdate:modelValue":l[1]||(l[1]=s=>a(e).developerId=s)},null,8,["modelValue"])]),_:1}),o(p,{label:"appSecret"},{default:t(()=>[o(f,{modelValue:a(e).appSecret,"onUpdate:modelValue":l[2]||(l[2]=s=>a(e).appSecret=s)},null,8,["modelValue"])]),_:1}),o(p,{label:"",class:"continer-item"},{default:t(()=>[o(y,{type:"primary",onClick:C},{default:t(()=>[N]),_:1})]),_:1})]),_:1})):V("",!0),a(d)=="shangpu"?(i(),S("span",P,"\u8BF7\u5728\u4EE3\u7406\u540E\u53F0\u914D\u7F6E")):V("",!0)]),_:1})}}});export{U as default};
