'use client' import type { AdminEventDetailData } from './types' import Button from '@/components/formElements/Button' import { APP_ROUTES } from '@/constants/routes' import { texts } from '@/texts' import { resolveAdminEventLifecycleHint } from './adminEventLifecycleHints' interface AdminEventLifecycleActionsProps { event: AdminEventDetailData pendingId: string | null onApprove: () => void onOpenReject: () => void onForcePublish: () => void onComplete: () => void onCancel: () => void onDelete: () => void } const AdminEventLifecycleActions = ({ event, pendingId, onApprove, onOpenReject, onForcePublish, onComplete, onCancel, onDelete, }: AdminEventLifecycleActionsProps) => { const hint = resolveAdminEventLifecycleHint(event) return (
{['draft', 'pending_review', 'published', 'full'].includes(event.status) ? ( ) : null} {event.status === 'draft' && !event.adminApprovedAt ? ( ) : null} {event.status === 'draft' && event.adminApprovedAt ? ( تأییدشده؛ منتظر میزبان ) : null} {event.status === 'pending_review' ? ( <> ) : null} {event.status === 'draft' ? ( ) : null} {event.status === 'published' || event.status === 'full' ? ( <> ) : null} {event.bookedCount === 0 ? ( ) : null}
{hint ?

{hint}

: null}
) } export default AdminEventLifecycleActions