import{d as f,eA as y,G as b,b as g,c as w,u as _}from"./outputWidgets.df68f70a.js";import{F as m}from"./forms.4628ec59.js";import{e as F,d as h}from"./icons.6f0b428b.js";import{a as C}from"./asyncComputed.c4f3fa7a.js";import{a as k}from"./ant-design.4f24b7fc.js";import{C as x}from"./CrudView.8169c4b4.js";import"./record.493f7d84.js";import"./pubsub.26abae80.js";import"./transButton.b32cb3fc.js";import"./Text.5293eafa.js";import"./Base.8da1f136.js";import"./router.d34810ba.js";import"./Title.d7a9606c.js";import"./index.a1698b08.js";import"./url.e14018a7.js";import"./index.4c2136c4.js";import"./index.f12da0b9.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="5c588863-8e88-45e4-ac57-c9d18c2c3d2b",r._sentryDebugIdIdentifier="sentry-dbid-5c588863-8e88-45e4-ac57-c9d18c2c3d2b")}catch{}})();const $=f({__name:"Forms",setup(r){const a=y(),{loading:n,result:i,refetch:d}=C(()=>m.list()),s=({key:e})=>a.push({name:"formEditor",params:{id:e}}),c=async()=>{const e=await m.create();s({key:e.id})},l=async({key:e})=>{var o,t;await k("Are you sure you want to delete this form?")&&(await((t=(o=i.value)==null?void 0:o.find(p=>p.id===e))==null?void 0:t.delete()),d())},u=b(()=>{var e,o;return{columns:[{name:"Form Name"},{name:"Path"},{name:"Actions",align:"right"}],rows:(o=(e=i.value)==null?void 0:e.map(t=>({key:t.id,cells:[{text:t.title,link:`/_editor/form/${encodeURIComponent(t.id)}`},{text:t.path},{text:"",actions:[{icon:F,label:"Edit Form",onClick:s},{icon:h,label:"Delete",onClick:l,dangerous:!0}]}]})))!=null?o:[]}});return(e,o)=>(g(),w(x,{loading:_(n),title:"Forms",description:"Create forms with advanced logic, easy integrations and custom branding.","create-button-text":"Create Form","empty-title":"No forms here yet","video-url":"https://www.youtube.com/embed/p6xf8PxL2Yg",table:u.value,"entity-name":"Form",onCreate:c},null,8,["loading","table"]))}});export{$ as default};
//# sourceMappingURL=Forms.e6ad54ce.js.map
