import{d as f,eA as b,G as y,b as g,c as w,u as _}from"./outputWidgets.04a14374.js";import{F as d}from"./forms.3838d536.js";import{e as F,d as h}from"./icons.dee9dbe8.js";import{a as C}from"./asyncComputed.53598080.js";import{a as k}from"./ant-design.213d3e09.js";import{C as x}from"./CrudView.a6f509b7.js";import"./record.b64a41e6.js";import"./pubsub.bb759777.js";import"./transButton.772cc0ed.js";import"./Text.84d5ffc7.js";import"./Base.0c1843db.js";import"./router.4677d467.js";import"./Title.9beb186f.js";import"./index.5d9ba614.js";import"./url.311573c2.js";import"./index.9bdc1e6b.js";import"./index.90d3343e.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]="fe81ef53-d09f-4c1c-95cd-a8bbad7cd714",r._sentryDebugIdIdentifier="sentry-dbid-fe81ef53-d09f-4c1c-95cd-a8bbad7cd714")}catch{}})();const $=f({__name:"Forms",setup(r){const a=b(),{loading:n,result:i,refetch:m}=C(()=>d.list()),s=({key:e})=>a.push({name:"formEditor",params:{id:e}}),c=async()=>{const e=await d.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()),m())},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:c},null,8,["loading","table"]))}});export{$ as default};
//# sourceMappingURL=Forms.075fff30.js.map
