import type { VariantProps } from "class-variance-authority"

import type { awardPointsVariants } from "@/components/Blocks/DynamicContent/Points/EarnAndBurn/AwardPoints/awardPointsVariants"
import type { Lang } from "@/constants/languages"
import type { UserQueryRouter } from "../user"

export type TransactionResponse = Awaited<
  ReturnType<UserQueryRouter["transaction"]["friendTransactions"]>
>
export type TransactionsNonNullResponseObject = NonNullable<TransactionResponse>
export type Transactions =
  NonNullable<TransactionsNonNullResponseObject>["data"]["transactions"]
export type Transaction =
  NonNullable<TransactionsNonNullResponseObject>["data"]["transactions"][number]

export type ClientEarnAndBurnProps = {
  initialData: TransactionsNonNullResponseObject
  lang: Lang
}

export type EarnAndBurnProps = {
  lang: Lang
}

export interface ClientTableProps {
  transactions: Transactions
}

export interface RowProps {
  transaction: Transaction
}

export interface AwardPointsProps extends Pick<Transaction, "awardPoints"> {}

export interface AwardPointsVariantProps
  extends VariantProps<typeof awardPointsVariants> {}
