import{u as P}from"./useInstance.233fbdde.js";import{M as U}from"./index.dfdc0704.js";import{az as n,d as O,a6 as G,r as _,p as V,b as L,b4 as j,c,e as z,k as R,i as r,h as l,u as o,q as Q,a2 as H,m as v,E,_ as J}from"./index.0308b213.js";import{S as K}from"./index.de7bcb5e.js";const se=()=>n.request({url:"addon/diypage.web.MemberNav/config",method:"GET",params:{}}),re=t=>n.request({url:"addon/diypage.web.MemberNav/config",method:"POST",data:t}),W=t=>n.request({url:"addon/diypage.web.MemberNav/add",method:"POST",data:t}),de=t=>n.request({url:"addon/diypage.web.MemberNav/status",method:"POST",data:t}),ne=t=>n.request({url:"addon/diypage.web.MemberNav/delete",method:"POST",data:t}),X=t=>n.request({url:"addon/diypage.web.MemberNav/edit",method:"POST",data:t}),Y=t=>n.request({url:"addon/diypage.web.MemberNav/detail",method:"GET",params:{id:t}}),ie=t=>n.request({url:"addon/diypage.web.MemberNav/lists",method:"GET",params:{params:t}}),Z=v("\u9009\u62E9\u7B2C\u4E09\u65B9\u94FE\u63A5"),$=v("\u63D0\u4EA4"),I=v("\u53D6\u6D88"),ee=O({props:{modelValue:{type:Boolean},id:null},emits:["update:modelValue","onClose"],setup(t,{emit:g}){const i=t;G();const F=_(!1);V(()=>i.modelValue,u=>{F.value=u});const{global:A}=P();let f=_(!1);const h=()=>{f.value=!0},M=u=>{u.type==1?e.link=u.miniProgram:u.type==2?e.link=u.webview:u.type==3&&(e.link=u.phone)},N=u=>{e.link=u},e=L({status:1,link:"",title:"",thumb:"",displayorder:155}),k=_();let m=_(!1),d=null;const B=()=>(console.log(i.id,"===========props.id"),Y(i.id)),w=()=>{if(!i.id){m.value=!1,d==null||d.close();return}B().then(u=>{m.value=!0,e.title=u.title,e.thumb=u.thumb,e.link=u.link,e.displayorder=u.displayorder,d==null||d.close()}).catch(()=>{m.value=!1,d==null||d.close(),E({message:"\u83B7\u53D6\u6570\u636E\u5931\u8D25",type:"error"})})};V(()=>i.id,u=>{u?(d=j.service({fullscreen:!0}),w()):m.value=!1},{immediate:!0});const q=()=>(e.id=i.id,X(e)),D=()=>W(e),S=()=>{m.value?q().then(u=>{E({message:"\u4FEE\u6539\u5BFC\u822A\u56FE\u6807\u6570\u636E\u6210\u529F",type:"success"}),b()}):D().then(u=>{E({message:"\u65B0\u589E\u5BFC\u822A\u56FE\u6807\u6570\u636E\u6210\u529F",type:"success"}),b()})},b=()=>{g("update:modelValue",!1),g("onClose"),A.$resetForm(k.value,e)};return(u,a)=>{const p=c("el-form-item"),C=c("el-input"),y=c("el-button"),T=c("el-input-number"),x=c("el-dialog");return z(),R(x,{modelValue:F.value,"onUpdate:modelValue":a[5]||(a[5]=s=>F.value=s),title:o(m)?"\u7F16\u8F91\u5BFC\u822A\u56FE\u6807":"\u65B0\u589E\u5BFC\u822A\u56FE\u6807",width:"50%","destroy-on-close":"",onClose:b},{default:r(()=>[l(o(H),{model:o(e),"label-width":"120px"},{default:r(()=>[l(p,null,{default:r(()=>[l(o(K),{url:o(e).link,modelValue:o(f),"onUpdate:modelValue":a[0]||(a[0]=s=>Q(f)?f.value=s:f=s),onConfirmAll:M,onChange:N},null,8,["url","modelValue"])]),_:1}),l(p,{label:"\u8BF7\u8F93\u5165\u6807\u9898",prop:"title"},{default:r(()=>[l(C,{modelValue:o(e).title,"onUpdate:modelValue":a[1]||(a[1]=s=>o(e).title=s),placeholder:"\u8BF7\u8F93\u5165\u6807\u9898"},null,8,["modelValue"])]),_:1}),l(p,{label:"\u8DF3\u8F6C\u94FE\u63A5",prop:"link",style:{display:"flex"}},{default:r(()=>[l(C,{modelValue:o(e).link,"onUpdate:modelValue":a[2]||(a[2]=s=>o(e).link=s),placeholder:"\u8BF7\u8F93\u5165\u8DF3\u8F6C\u94FE\u63A5(\u6CE8:\u5982\u672A\u8BBE\u7F6E\u94FE\u63A5\u5219\u8DF3\u8F6C\u5230\u5546\u6237\u5206\u7C7B)"},{append:r(()=>[l(y,{type:"primary",onClick:h},{default:r(()=>[Z]),_:1})]),_:1},8,["modelValue"])]),_:1}),l(p,{label:"\u56FE\u6807",prop:"thumb"},{default:r(()=>[l(U,{modelValue:o(e).thumb,"onUpdate:modelValue":a[3]||(a[3]=s=>o(e).thumb=s),limit:1},null,8,["modelValue"])]),_:1}),l(p,{label:"\u6392\u5E8F",prop:"displayorder"},{default:r(()=>[l(T,{modelValue:o(e).displayorder,"onUpdate:modelValue":a[4]||(a[4]=s=>o(e).displayorder=s)},null,8,["modelValue"])]),_:1}),l(p,null,{default:r(()=>[l(y,{type:"primary",onClick:S},{default:r(()=>[$]),_:1}),l(y,{onClick:b},{default:r(()=>[I]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])}}});const ue=J(ee,[["__scopeId","data-v-61bfaf60"]]),me=Object.freeze(Object.defineProperty({__proto__:null,default:ue},Symbol.toStringTag,{value:"Module"}));export{ue as E,se as a,me as b,ne as d,re as e,ie as g,de as s};
