import {
  Asset as PrismaAsset,
  Assignment,
  ItemStatus as PrismaItemStatus,
} from "@/generated/prisma/client"

export type Asset = PrismaAsset

export type ItemStatus = PrismaItemStatus

export type NewAssetStatus = "AVAILABLE" | "ASSIGNED"

export type UpdateAssetStatus = NewAssetStatus | "RESERVED" | "IN_REPAIR"

export type AssetSummary = Pick<Asset, "id" | "serialNumber" | "status">

export type AssetWithAssignment = Asset & {
  assignment: Assignment | null
}

export type AssetWithItemAndCategory = {
  id: string
  serialNumber: string
  deliveryNote?: string | null
  status: ItemStatus
  item: {
    id: string
    name: string
    category: {
      id: string
      name: string
    }
  } | null
}
