/* Copyright (C) 2024 Manuel Bustillo*/ 'use client'; import { updateGuest } from '@/app/api/guests'; import { Guest, GuestStatus } from '@/app/lib/definitions'; import { classNames } from '@/app/ui/components/button'; import clsx from 'clsx'; import InlineTextField from '../components/form/inlineTextField'; import TableOfContents from '../components/table-of-contents'; export default function guestsTable({ guests, onUpdate }: { guests: Guest[], onUpdate: () => void }) { const handleGuestChange = (guest: Guest, status: GuestStatus) => { guest.status = status; updateGuest(guest).then(() => onUpdate()); } return ( ( { guest.name = newName; updateGuest(guest) }} /> {guest.group_name} {guest.status} {guest.status === 'considered' && ()} {(guest.status === 'invited' || guest.status === 'tentative') && ( <> {guest.status != 'tentative' && } )} )} /> ); }