import{d as f,eA as b,G as y,b as g,c as w,u as _}from"./outputWidgets.e822ff0f.js";import{F as m}from"./forms.16259019.js";import{e as F,d as h}from"./icons.0ab0d55f.js";import{a as C}from"./asyncComputed.68870ff7.js";import{a as k}from"./ant-design.e2b10503.js";import{C as x}from"./CrudView.0a0ee0a6.js";import"./record.edca104e.js";import"./pubsub.ae710ef5.js";import"./transButton.f06af665.js";import"./Text.4c9d53a2.js";import"./Base.775de4d5.js";import"./router.8fbd98d9.js";import"./Title.5afb3003.js";import"./index.bf8163eb.js";import"./url.c786ab78.js";import"./index.eb9667df.js";import"./index.1b95bbbc.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]="8eca2b6e-68a9-49f5-b381-b55acc431ecf",r._sentryDebugIdIdentifier="sentry-dbid-8eca2b6e-68a9-49f5-b381-b55acc431ecf")}catch{}})();const $=f({__name:"Forms",setup(r){const a=b(),{loading:n,result:i,refetch:c}=C(()=>m.list()),s=({key:e})=>a.push({name:"formEditor",params:{id:e}}),d=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()),c())},u=y(()=>{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:d},null,8,["loading","table"]))}});export{$ as default};
//# sourceMappingURL=Forms.13a02503.js.map
