"use client"; import { useEffect, useState } from "react"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { toast } from "sonner"; import { videoApi, type VideoCut, type VideoPost } from "@/lib/api/video"; import { getErrorMessage } from "@/lib/api/client"; import { haptics } from "@/lib/telegram/webapp"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/textarea"; import { PrimaryAction } from "./primary-action"; import { RejectForm } from "./reject-form"; import { cn } from "@/lib/utils"; const MAX_X_CAPTION_CHARS = 280; const MAX_TIKTOK_CAPTION_CHARS = 2200; const MIN_REJECT_CHARS = 4; const CUT_LABELS: Record = { vertical: "9:16", square: "1:1", }; /** * Rendered-cut player. The media route is authenticated, so a bare * `