import{aA as x,a7 as U,a8 as m,b as M,M as R,P as C}from"./app-QjDgb7aF.js";import{F}from"./section-Dbg05qO2.js";import{b as N,j as S,p as D,k as a,i as o,J as t,I as s,u,q as g,D as P,a as d}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const E={class:"_formRoot"},I={class:"_formBlock",style:{display:"flex",gap:"var(--margin)","flex-wrap":"wrap"}},W=N({__name:"webhook.new",setup(j){let n=d(""),p=d(""),i=d(""),f=d(!0),V=d(!0),k=d(!0),v=d(!0),w=d(!0),B=d(!0),b=d(!0);async function y(){const r=[];f.value&&r.push("follow"),V.value&&r.push("followed"),k.value&&r.push("note"),v.value&&r.push("reply"),w.value&&r.push("renote"),B.value&&r.push("reaction"),b.value&&r.push("mention"),C("i/webhooks/create",{name:n.value,url:p.value,secret:i.value,on:r})}return x({title:"Create new webhook",icon:"ph-webhooks-logo ph-bold ph-lg"}),(r,l)=>(S(),D("div",E,[a(U,{modelValue:u(n),"onUpdate:modelValue":l[0]||(l[0]=e=>s(n)?n.value=e:n=e),class:"_formBlock"},{label:o(()=>[...l[10]||(l[10]=[t("Name",-1)])]),_:1},8,["modelValue"]),a(U,{modelValue:u(p),"onUpdate:modelValue":l[1]||(l[1]=e=>s(p)?p.value=e:p=e),type:"url",class:"_formBlock"},{label:o(()=>[...l[11]||(l[11]=[t("URL",-1)])]),_:1},8,["modelValue"]),a(U,{modelValue:u(i),"onUpdate:modelValue":l[2]||(l[2]=e=>s(i)?i.value=e:i=e),class:"_formBlock"},{prefix:o(()=>[...l[12]||(l[12]=[g("i",{class:"ph-lock ph-bold ph-lg"},null,-1)])]),label:o(()=>[...l[13]||(l[13]=[t("Secret",-1)])]),_:1},8,["modelValue"]),a(F,null,{label:o(()=>[...l[14]||(l[14]=[t("Events",-1)])]),default:o(()=>[a(m,{modelValue:u(f),"onUpdate:modelValue":l[3]||(l[3]=e=>s(f)?f.value=e:f=e),class:"_formBlock"},{default:o(()=>[...l[15]||(l[15]=[t("Follow",-1)])]),_:1},8,["modelValue"]),a(m,{modelValue:u(V),"onUpdate:modelValue":l[4]||(l[4]=e=>s(V)?V.value=e:V=e),class:"_formBlock"},{default:o(()=>[...l[16]||(l[16]=[t("Followed",-1)])]),_:1},8,["modelValue"]),a(m,{modelValue:u(k),"onUpdate:modelValue":l[5]||(l[5]=e=>s(k)?k.value=e:k=e),class:"_formBlock"},{default:o(()=>[...l[17]||(l[17]=[t("Posts",-1)])]),_:1},8,["modelValue"]),a(m,{modelValue:u(v),"onUpdate:modelValue":l[6]||(l[6]=e=>s(v)?v.value=e:v=e),class:"_formBlock"},{default:o(()=>[...l[18]||(l[18]=[t("Replies",-1)])]),_:1},8,["modelValue"]),a(m,{modelValue:u(w),"onUpdate:modelValue":l[7]||(l[7]=e=>s(w)?w.value=e:w=e),class:"_formBlock"},{default:o(()=>[...l[19]||(l[19]=[t("Boosts",-1)])]),_:1},8,["modelValue"]),a(m,{modelValue:u(B),"onUpdate:modelValue":l[8]||(l[8]=e=>s(B)?B.value=e:B=e),class:"_formBlock"},{default:o(()=>[...l[20]||(l[20]=[t("Reaction",-1)])]),_:1},8,["modelValue"]),a(m,{modelValue:u(b),"onUpdate:modelValue":l[9]||(l[9]=e=>s(b)?b.value=e:b=e),class:"_formBlock"},{default:o(()=>[...l[21]||(l[21]=[t("Mention",-1)])]),_:1},8,["modelValue"])]),_:1}),g("div",I,[a(R,{primary:"",inline:"",onClick:y},{default:o(()=>[l[22]||(l[22]=g("i",{class:"ph-check ph-bold ph-lg"},null,-1)),t(" "+P(u(M).ts.create),1)]),_:1})])]))}});export{W as default};
//# sourceMappingURL=webhook.new-CEZ97qPp.js.map
