import{a4 as U,a5 as c,a2 as d,i as h,M as g,P as y}from"./app-JmgyQoR0.js";import{F as x}from"./section-yxO0GkeZ.js";import{b as M,a as u,c as B,h as C,t as F,l as a,j as o,K as t,u as w,E as N,z as R}from"./vue-y3KLWBaS.js";const S={class:"_formRoot"},E=w("i",{class:"ph-lock ph-bold ph-lg"},null,-1),P={class:"_formBlock",style:{display:"flex",gap:"var(--margin)","flex-wrap":"wrap"}},D=w("i",{class:"ph-check ph-bold ph-lg"},null,-1),L=M({__name:"webhook.new",setup(j){let n=u(""),r=u(""),m=u(""),i=u(!0),p=u(!0),f=u(!0),v=u(!0),V=u(!0),_=u(!0),k=u(!0);async function b(){const s=[];i.value&&s.push("follow"),p.value&&s.push("followed"),f.value&&s.push("note"),v.value&&s.push("reply"),V.value&&s.push("renote"),_.value&&s.push("reaction"),k.value&&s.push("mention"),y("i/webhooks/create",{name:n.value,url:r.value,secret:m.value,on:s})}return B(()=>[]),B(()=>[]),U({title:"Create new webhook",icon:"ph-webhooks-logo ph-bold ph-lg"}),(s,e)=>(C(),F("div",S,[a(c,{modelValue:n.value,"onUpdate:modelValue":e[0]||(e[0]=l=>n.value=l),class:"_formBlock"},{label:o(()=>[t("Name")]),_:1},8,["modelValue"]),a(c,{modelValue:r.value,"onUpdate:modelValue":e[1]||(e[1]=l=>r.value=l),type:"url",class:"_formBlock"},{label:o(()=>[t("URL")]),_:1},8,["modelValue"]),a(c,{modelValue:m.value,"onUpdate:modelValue":e[2]||(e[2]=l=>m.value=l),class:"_formBlock"},{prefix:o(()=>[E]),label:o(()=>[t("Secret")]),_:1},8,["modelValue"]),a(x,null,{label:o(()=>[t("Events")]),default:o(()=>[a(d,{modelValue:i.value,"onUpdate:modelValue":e[3]||(e[3]=l=>i.value=l),class:"_formBlock"},{default:o(()=>[t("Follow")]),_:1},8,["modelValue"]),a(d,{modelValue:p.value,"onUpdate:modelValue":e[4]||(e[4]=l=>p.value=l),class:"_formBlock"},{default:o(()=>[t("Followed")]),_:1},8,["modelValue"]),a(d,{modelValue:f.value,"onUpdate:modelValue":e[5]||(e[5]=l=>f.value=l),class:"_formBlock"},{default:o(()=>[t("Posts")]),_:1},8,["modelValue"]),a(d,{modelValue:v.value,"onUpdate:modelValue":e[6]||(e[6]=l=>v.value=l),class:"_formBlock"},{default:o(()=>[t("Replies")]),_:1},8,["modelValue"]),a(d,{modelValue:V.value,"onUpdate:modelValue":e[7]||(e[7]=l=>V.value=l),class:"_formBlock"},{default:o(()=>[t("Boosts")]),_:1},8,["modelValue"]),a(d,{modelValue:_.value,"onUpdate:modelValue":e[8]||(e[8]=l=>_.value=l),class:"_formBlock"},{default:o(()=>[t("Reaction")]),_:1},8,["modelValue"]),a(d,{modelValue:k.value,"onUpdate:modelValue":e[9]||(e[9]=l=>k.value=l),class:"_formBlock"},{default:o(()=>[t("Mention")]),_:1},8,["modelValue"])]),_:1}),w("div",P,[a(g,{primary:"",inline:"",onClick:b},{default:o(()=>[D,t(" "+N(R(h).ts.create),1)]),_:1})])]))}});export{L as default};
