'use client'
import type { AdminEventDetailData } from './types'
import Button from '@/components/formElements/Button'
import { APP_ROUTES } from '@/constants/routes'
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) => (
{['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' || event.status === 'pending_review' ? (
) : null}
{event.status === 'published' || event.status === 'full' ? (
<>
>
) : null}
{event.bookedCount === 0 ? (
) : null}
)
export default AdminEventLifecycleActions