import { ImageObject } from "@/types/Common";

/**
 * An award as it appears on a creator's profile (`creator.dijak[]`).
 * `url` is the locale-specific slug used to reach the award detail page
 * (`/dij/[slug]`). `urlEn` will start arriving from the backend later — same
 * pattern as the program subpage — so it's optional for now.
 */
export interface CreatorAward {
  id: number;
  nev: string;
  url: string;
  urlEn?: string | null;
  ev: number | null;
  leiras: string | null;
  dijazasTipusaId: number | null;
  dijazasTipusaNev: string | null;
  dijazasTipusaLeiras: string | null;
  dijazasTipusaDefinicio: string | null;
}

/**
 * The shared award descriptor carried by every award instance returned for a
 * given slug. Same award, repeated across each recipient record.
 */
export interface AwardDescriptor {
  id: number;
  nev: string;
  url: string;
  urlEn?: string | null;
  leiras: string | null;
  tipusaId: number | null;
  tipusaNev: string | null;
  tipusaLeiras: string | null;
  tipusaDefinicio: string | null;
}

/** A single award handed out once (a "díjpéldány"). */
export interface AwardInstanceDetails {
  ev: number | null;
  nev: string | null;
  intezmenyNeve: string | null;
  intezmenyHelyszine: string | null;
  ervenyessegKezdete: string | null;
  ervenyessegVege: string | null;
}

/** The recipient of an award instance. */
export interface AwardRecipient {
  alkotoAzonosito: string;
  nev: string | null;
  szakma: string | null;
  indoklas: string | null;
  profilkep: ImageObject | null;
}

/**
 * One row of the award detail response: a single award instance handed to a
 * single person. The detail page receives an array of these by slug.
 */
export interface AwardInstance {
  dijPeldany: AwardInstanceDetails;
  dij: AwardDescriptor;
  szemely: AwardRecipient;
}
