1import{d as a,j as t,a as r}from"./index-4ce00ee7.js";import{g as o}from"./index-7de85521.js";import{t as i}from"./index-51f3a61d.js";import{t as n}from"./formatters-cb9ccf71.js";const u=o` 2 mutation DeleteTournamentFormatMutation($id: String!) { 3 deleteTournamentFormat(id: $id) { 4 id 5 } 6 } 7`,d=({tournamentFormats:s})=>{const[c]=a.useMutation(u,{onCompleted:()=>{i.toast.success("TournamentFormat deleted")},onError:e=>{i.toast.error(e.message)},refetchQueries:[{query:l}],awaitRefetchQueries:!0}),m=e=>{confirm("Are you sure you want to delete tournamentFormat "+e+"?")&&c({variables:{id:e}})};return t.jsx("div",{className:"rw-segment rw-table-wrapper-responsive",children:t.jsxs("table",{className:"rw-table",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{children:"Id"}),t.jsx("th",{children:"Name"}),t.jsx("th",{children:"Description"}),t.jsx("th",{children:"Â "})]})}),t.jsx("tbody",{children:s.map(e=>t.jsxs("tr",{children:[t.jsx("td",{children:n(e.id)}),t.jsx("td",{children:n(e.name)}),t.jsx("td",{children:n(e.description)}),t.jsx("td",{children:t.jsxs("nav",{className:"rw-table-actions",children:[t.jsx(r.Link,{to:r.routes.tournamentFormat({id:e.id}),title:"Show tournamentFormat "+e.id+" detail",className:"rw-button rw-button-small",children:"Show"}),t.jsx(r.Link,{to:r.routes.editTournamentFormat({id:e.id}),title:"Edit tournamentFormat "+e.id,className:"rw-button rw-button-small rw-button-blue",children:"Edit"}),t.jsx("button",{type:"button",title:"Delete tournamentFormat "+e.id,className:"rw-button rw-button-small rw-button-red",onClick:()=>m(e.id),children:"Delete"})]})})]},e.id))})]})})},l=o` 8 query FindTournamentFormats { 9 tournamentFormats { 10 id 11 name 12 description 13 active 14 createdAt 15 updatedAt 16 } 17 } 18`,h=()=>t.jsx("div",{children:"Loading..."}),x=({tournamentFormats:s})=>t.jsx(d,{tournamentFormats:s}),j=({error:s})=>t.jsx("div",{className:"rw-cell-error",children:s==null?void 0:s.message}),p=({tournamentFormats:s})=>t.jsx(d,{tournamentFormats:s}),w=a.createCell({QUERY:l,Loading:h,Empty:x,Failure:j,Success:p,displayName:"TournamentFormatsCell"}),F=()=>t.jsx(w,{});export{F as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.