export type CardId = string;

export type CardKind = "note" | "terminal" | "app" | "thumbnail";

export interface BaseCard {
  id: CardId;
  kind: CardKind;
  x: number;
  y: number;
  width: number;
  height: number;
  z: number;
}

export interface NoteCard extends BaseCard {
  kind: "note";
  text: string;
}

export interface TerminalCard extends BaseCard {
  kind: "terminal";
  ptyId: string;
}

export interface AppCard extends BaseCard {
  kind: "app";
  xWindowId: number;
  command: string;
  title?: string;
}

export interface ThumbnailCard extends BaseCard {
  kind: "thumbnail";
  refCardId: CardId;
  label: string;
}

export type Card = NoteCard | TerminalCard | AppCard | ThumbnailCard;

export interface Viewport {
  x: number;
  y: number;
  scale: number;
}
