import 'package:flutter_inappwebview_internal_annotations/flutter_inappwebview_internal_annotations.dart';

import '../print_job/main.dart';

part 'print_job_media_size.g.dart';

///Class representing the supported media size for a [PlatformPrintJobController].
///Media size is the dimension of the media on which the content is printed.
@ExchangeableObject()
class PrintJobMediaSize_ {
  ///The unique media size id.
  ///
  ///It is unique amongst other media sizes supported by the printer.
  ///This id is defined by the client that generated the media size
  ///instance and should not be interpreted by other parties.
  final String id;

  ///The human readable label.
  final String? label;

  ///The media width in mils (thousandths of an inch).
  final int widthMils;

  ///The media height in mils (thousandths of an inch).
  final int heightMils;

  const PrintJobMediaSize_(
      {required this.id,
      required this.widthMils,
      required this.heightMils,
      this.label});

  ///Unknown media size in portrait mode.
  ///
  ///**NOTE**: This is for specifying orientation without media size.
  ///You should not use the dimensions reported by this instance.
  static const UNKNOWN_PORTRAIT = const PrintJobMediaSize_(
      id: "UNKNOWN_PORTRAIT", widthMils: 1, heightMils: 0x7fffffff);

  ///Unknown media size in portrait mode.
  ///
  ///**NOTE**: This is for specifying orientation without media size.
  ///You should not use the dimensions reported by this instance.
  static const UNKNOWN_LANDSCAPE = const PrintJobMediaSize_(
      id: "UNKNOWN_LANDSCAPE", widthMils: 0x7fffffff, heightMils: 1);

  // ISO sizes

  ///ISO A0 media size: 841mm x 1189mm (33.11" x 46.81")
  static const ISO_A0 = const PrintJobMediaSize_(
      id: "ISO_A0", widthMils: 33110, heightMils: 46810);

  ///ISO A1 media size: 594mm x 841mm (23.39" x 33.11")
  static const ISO_A1 = const PrintJobMediaSize_(
      id: "ISO_A1", widthMils: 23390, heightMils: 33110);

  ///ISO A2 media size: 420mm x 594mm (16.54" x 23.39")
  static const ISO_A2 = const PrintJobMediaSize_(
      id: "ISO_A2", widthMils: 16540, heightMils: 23390);

  ///ISO A3 media size: 297mm x 420mm (11.69" x 16.54")
  static const ISO_A3 = const PrintJobMediaSize_(
      id: "ISO_A3", widthMils: 11690, heightMils: 16540);

  ///ISO A4 media size: 210mm x 297mm (8.27" x 11.69")
  static const ISO_A4 = const PrintJobMediaSize_(
      id: "ISO_A4", widthMils: 8270, heightMils: 11690);

  ///ISO A5 media size: 148mm x 210mm (5.83" x 8.27")
  static const ISO_A5 =
      const PrintJobMediaSize_(id: "ISO_A5", widthMils: 5830, heightMils: 8270);

  ///ISO A6 media size: 105mm x 148mm (4.13" x 5.83")
  static const ISO_A6 =
      const PrintJobMediaSize_(id: "ISO_A6", widthMils: 4130, heightMils: 5830);

  ///ISO A7 media size: 74mm x 105mm (2.91" x 4.13")
  static const ISO_A7 =
      const PrintJobMediaSize_(id: "ISO_A7", widthMils: 2910, heightMils: 4130);

  ///ISO A8 media size: 52mm x 74mm (2.05" x 2.91")
  static const ISO_A8 =
      const PrintJobMediaSize_(id: "ISO_A8", widthMils: 2050, heightMils: 2910);

  ///ISO A9 media size: 37mm x 52mm (1.46" x 2.05")
  static const ISO_A9 =
      const PrintJobMediaSize_(id: "ISO_A9", widthMils: 1460, heightMils: 2050);

  ///ISO A10 media size: 26mm x 37mm (1.02" x 1.46")
  static const ISO_A10 = const PrintJobMediaSize_(
      id: "ISO_A10", widthMils: 1020, heightMils: 1460);

  ///ISO B0 media size: 1000mm x 1414mm (39.37" x 55.67")
  static const ISO_B0 = const PrintJobMediaSize_(
      id: "ISO_B0", widthMils: 39370, heightMils: 55670);

  ///ISO B1 media size: 707mm x 1000mm (27.83" x 39.37")
  static const ISO_B1 = const PrintJobMediaSize_(
      id: "ISO_B1", widthMils: 27830, heightMils: 39370);

  ///ISO B2 media size: 500mm x 707mm (19.69" x 27.83")
  static const ISO_B2 = const PrintJobMediaSize_(
      id: "ISO_B2", widthMils: 19690, heightMils: 27830);

  ///ISO B3 media size: 353mm x 500mm (13.90" x 19.69")
  static const ISO_B3 = const PrintJobMediaSize_(
      id: "ISO_B3", widthMils: 13900, heightMils: 19690);

  ///ISO B4 media size: 250mm x 353mm (9.84" x 13.90")
  static const ISO_B4 = const PrintJobMediaSize_(
      id: "ISO_B4", widthMils: 9840, heightMils: 13900);

  ///ISO B5 media size: 176mm x 250mm (6.93" x 9.84")
  static const ISO_B5 =
      const PrintJobMediaSize_(id: "ISO_B5", widthMils: 6930, heightMils: 9840);

  ///ISO B6 media size: 125mm x 176mm (4.92" x 6.93")
  static const ISO_B6 =
      const PrintJobMediaSize_(id: "ISO_B6", widthMils: 4920, heightMils: 6930);

  ///ISO B7 media size: 88mm x 125mm (3.46" x 4.92")
  static const ISO_B7 =
      const PrintJobMediaSize_(id: "ISO_B7", widthMils: 3460, heightMils: 4920);

  ///ISO B8 media size: 62mm x 88mm (2.44" x 3.46")
  static const ISO_B8 =
      const PrintJobMediaSize_(id: "ISO_B8", widthMils: 2440, heightMils: 3460);

  ///ISO B9 media size: 44mm x 62mm (1.73" x 2.44")
  static const ISO_B9 =
      const PrintJobMediaSize_(id: "ISO_B9", widthMils: 1730, heightMils: 2440);

  ///ISO B10 media size: 31mm x 44mm (1.22" x 1.73")
  static const ISO_B10 = const PrintJobMediaSize_(
      id: "ISO_B10", widthMils: 1220, heightMils: 1730);

  ///ISO C0 media size: 917mm x 1297mm (36.10" x 51.06")
  static const ISO_C0 = const PrintJobMediaSize_(
      id: "ISO_C0", widthMils: 36100, heightMils: 51060);

  ///ISO C1 media size: 648mm x 917mm (25.51" x 36.10")
  static const ISO_C1 = const PrintJobMediaSize_(
      id: "ISO_C1", widthMils: 25510, heightMils: 36100);

  ///ISO C2 media size: 458mm x 648mm (18.03" x 25.51")
  static const ISO_C2 = const PrintJobMediaSize_(
      id: "ISO_C2", widthMils: 18030, heightMils: 25510);

  ///ISO C3 media size: 324mm x 458mm (12.76" x 18.03")
  static const ISO_C3 = const PrintJobMediaSize_(
      id: "ISO_C3", widthMils: 12760, heightMils: 18030);

  ///ISO C4 media size: 229mm x 324mm (9.02" x 12.76")
  static const ISO_C4 = const PrintJobMediaSize_(
      id: "ISO_C4", widthMils: 9020, heightMils: 12760);

  ///ISO C5 media size: 162mm x 229mm (6.38" x 9.02")
  static const ISO_C5 =
      const PrintJobMediaSize_(id: "ISO_C5", widthMils: 6380, heightMils: 9020);

  ///ISO C6 media size: 114mm x 162mm (4.49" x 6.38")
  static const ISO_C6 =
      const PrintJobMediaSize_(id: "ISO_C6", widthMils: 4490, heightMils: 6380);

  ///ISO C7 media size: 81mm x 114mm (3.19" x 4.49")
  static const ISO_C7 =
      const PrintJobMediaSize_(id: "ISO_C7", widthMils: 3190, heightMils: 4490);

  ///ISO C8 media size: 57mm x 81mm (2.24" x 3.19")
  static const ISO_C8 =
      const PrintJobMediaSize_(id: "ISO_C8", widthMils: 2240, heightMils: 3190);

  ///ISO C9 media size: 40mm x 57mm (1.57" x 2.24")
  static const ISO_C9 =
      const PrintJobMediaSize_(id: "ISO_C9", widthMils: 1570, heightMils: 2240);

  ///ISO C10 media size: 28mm x 40mm (1.10" x 1.57")
  static const ISO_C10 = const PrintJobMediaSize_(
      id: "ISO_C10", widthMils: 1100, heightMils: 1570);

  // North America

  ///North America Letter media size: 8.5" x 11" (279mm x 216mm)
  static const NA_LETTER = const PrintJobMediaSize_(
      id: "NA_LETTER", widthMils: 8500, heightMils: 11000);

  ///North America Government-Letter media size: 8.0" x 10.5" (203mm x 267mm)
  static const NA_GOVT_LETTER = const PrintJobMediaSize_(
      id: "NA_GOVT_LETTER", widthMils: 8000, heightMils: 10500);

  ///North America Legal media size: 8.5" x 14" (216mm x 356mm)
  static const NA_LEGAL = const PrintJobMediaSize_(
      id: "NA_LEGAL", widthMils: 8500, heightMils: 14000);

  ///North America Junior Legal media size: 8.0" x 5.0" (203mm × 127mm)
  static const NA_JUNIOR_LEGAL = const PrintJobMediaSize_(
      id: "NA_JUNIOR_LEGAL", widthMils: 8000, heightMils: 5000);

  ///North America Ledger media size: 17" x 11" (432mm × 279mm)
  static const NA_LEDGER = const PrintJobMediaSize_(
      id: "NA_LEDGER", widthMils: 17000, heightMils: 11000);

  ///North America Tabloid media size: 11" x 17" (279mm × 432mm)
  static const NA_TABLOID = const PrintJobMediaSize_(
      id: "NA_TABLOID", widthMils: 11000, heightMils: 17000);

  ///North America Index Card 3x5 media size: 3" x 5" (76mm x 127mm)
  static const NA_INDEX_3X5 = const PrintJobMediaSize_(
      id: "NA_INDEX_3X5", widthMils: 3000, heightMils: 5000);

  ///North America Index Card 4x6 media size: 4" x 6" (102mm x 152mm)
  static const NA_INDEX_4X6 = const PrintJobMediaSize_(
      id: "NA_INDEX_4X6", widthMils: 4000, heightMils: 6000);

  ///North America Index Card 5x8 media size: 5" x 8" (127mm x 203mm)
  static const NA_INDEX_5X8 = const PrintJobMediaSize_(
      id: "NA_INDEX_5X8", widthMils: 5000, heightMils: 8000);

  ///North America Monarch media size: 7.25" x 10.5" (184mm x 267mm)
  static const NA_MONARCH = const PrintJobMediaSize_(
      id: "NA_MONARCH", widthMils: 7250, heightMils: 10500);

  ///North America Quarto media size: 8" x 10" (203mm x 254mm)
  static const NA_QUARTO = const PrintJobMediaSize_(
      id: "NA_QUARTO", widthMils: 8000, heightMils: 10000);

  ///North America Foolscap media size: 8" x 13" (203mm x 330mm)
  static const NA_FOOLSCAP = const PrintJobMediaSize_(
      id: "NA_FOOLSCAP", widthMils: 8000, heightMils: 13000);

  ///North America ANSI C media size: 17" x 22" (432mm x 559mm)
  static const ANSI_C = const PrintJobMediaSize_(
      id: "ANSI_C", widthMils: 17000, heightMils: 22000);

  ///North America ANSI D media size: 22" x 34" (559mm x 864mm)
  static const ANSI_D = const PrintJobMediaSize_(
      id: "ANSI_D", widthMils: 22000, heightMils: 34000);

  ///North America ANSI E media size: 34" x 44" (864mm x 1118mm)
  static const ANSI_E = const PrintJobMediaSize_(
      id: "ANSI_E", widthMils: 34000, heightMils: 44000);

  ///North America ANSI F media size: 28" x 40" (711mm x 1016mm)
  static const ANSI_F = const PrintJobMediaSize_(
      id: "ANSI_F", widthMils: 28000, heightMils: 40000);

  ///North America Arch A media size: 9" x 12" (229mm x 305mm)
  static const NA_ARCH_A = const PrintJobMediaSize_(
      id: "NA_ARCH_A", widthMils: 9000, heightMils: 12000);

  ///North America Arch B media size: 12" x 18" (305mm x 457mm)
  static const NA_ARCH_B = const PrintJobMediaSize_(
      id: "NA_ARCH_B", widthMils: 12000, heightMils: 18000);

  ///North America Arch C media size: 18" x 24" (457mm x 610mm)
  static const NA_ARCH_C = const PrintJobMediaSize_(
      id: "NA_ARCH_C", widthMils: 18000, heightMils: 24000);

  ///North America Arch D media size: 24" x 36" (610mm x 914mm)
  static const NA_ARCH_D = const PrintJobMediaSize_(
      id: "NA_ARCH_D", widthMils: 24000, heightMils: 36000);

  ///North America Arch E media size: 36" x 48" (914mm x 1219mm)
  static const NA_ARCH_E = const PrintJobMediaSize_(
      id: "NA_ARCH_E", widthMils: 36000, heightMils: 48000);

  ///North America Arch E1 media size: 30" x 42" (762mm x 1067mm)
  static const NA_ARCH_E1 = const PrintJobMediaSize_(
      id: "NA_ARCH_E1", widthMils: 30000, heightMils: 42000);

  ///North America Super B media size: 13" x 19" (330mm x 483mm)
  static const NA_SUPER_B = const PrintJobMediaSize_(
      id: "NA_SUPER_B", widthMils: 13000, heightMils: 19000);

  // Chinese

  ///Chinese ROC 8K media size: 270mm x 390mm (10.629" x 15.3543")
  static const ROC_8K = const PrintJobMediaSize_(
      id: "ROC_8K", widthMils: 10629, heightMils: 15354);

  ///Chinese ROC 16K media size: 195mm x 270mm (7.677" x 10.629")
  static const ROC_16K = const PrintJobMediaSize_(
      id: "ROC_16K", widthMils: 7677, heightMils: 10629);

  ///Chinese PRC 1 media size: 102mm x 165mm (4.015" x 6.496")
  static const PRC_1 =
      const PrintJobMediaSize_(id: "PRC_1", widthMils: 4015, heightMils: 6496);

  ///Chinese PRC 2 media size: 102mm x 176mm (4.015" x 6.929")
  static const PRC_2 =
      const PrintJobMediaSize_(id: "PRC_2", widthMils: 4015, heightMils: 6929);

  ///Chinese PRC 3 media size: 125mm x 176mm (4.921" x 6.929")
  static const PRC_3 =
      const PrintJobMediaSize_(id: "PRC_3", widthMils: 4921, heightMils: 6929);

  ///Chinese PRC 4 media size: 110mm x 208mm (4.330" x 8.189")
  static const PRC_4 =
      const PrintJobMediaSize_(id: "PRC_4", widthMils: 4330, heightMils: 8189);

  ///Chinese PRC 5 media size: 110mm x 220mm (4.330" x 8.661")
  static const PRC_5 =
      const PrintJobMediaSize_(id: "PRC_5", widthMils: 4330, heightMils: 8661);

  ///Chinese PRC 6 media size: 120mm x 320mm (4.724" x 12.599")
  static const PRC_6 =
      const PrintJobMediaSize_(id: "PRC_6", widthMils: 4724, heightMils: 12599);

  ///Chinese PRC 7 media size: 160mm x 230mm (6.299" x 9.055")
  static const PRC_7 =
      const PrintJobMediaSize_(id: "PRC_7", widthMils: 6299, heightMils: 9055);

  ///Chinese PRC 8 media size: 120mm x 309mm (4.724" x 12.165")
  static const PRC_8 =
      const PrintJobMediaSize_(id: "PRC_8", widthMils: 4724, heightMils: 12165);

  ///Chinese PRC 9 media size: 229mm x 324mm (9.016" x 12.756")
  static const PRC_9 =
      const PrintJobMediaSize_(id: "PRC_9", widthMils: 9016, heightMils: 12756);

  ///Chinese PRC 10 media size: 324mm x 458mm (12.756" x 18.032")
  static const PRC_10 = const PrintJobMediaSize_(
      id: "PRC_10", widthMils: 12756, heightMils: 18032);

  ///Chinese PRC 16k media size: 146mm x 215mm (5.749" x 8.465")
  static const PRC_16K = const PrintJobMediaSize_(
      id: "PRC_16K", widthMils: 5749, heightMils: 8465);

  ///Chinese Pa Kai media size: 267mm x 389mm (10.512" x 15.315")
  static const OM_PA_KAI = const PrintJobMediaSize_(
      id: "OM_PA_KAI", widthMils: 10512, heightMils: 15315);

  ///Chinese Dai Pa Kai media size: 275mm x 395mm (10.827" x 15.551")
  static const OM_DAI_PA_KAI = const PrintJobMediaSize_(
      id: "OM_DAI_PA_KAI", widthMils: 10827, heightMils: 15551);

  ///Chinese Jurro Ku Kai media size: 198mm x 275mm (7.796" x 10.827")
  static const OM_JUURO_KU_KAI = const PrintJobMediaSize_(
      id: "OM_JUURO_KU_KAI", widthMils: 7796, heightMils: 10827);

  // Japanese

  ///Japanese JIS B10 media size: 32mm x 45mm (1.259" x 1.772")
  static const JIS_B10 = const PrintJobMediaSize_(
      id: "JIS_B10", widthMils: 1259, heightMils: 1772);

  ///Japanese JIS B9 media size: 45mm x 64mm (1.772" x 2.52")
  static const JIS_B9 =
      const PrintJobMediaSize_(id: "JIS_B9", widthMils: 1772, heightMils: 2520);

  ///Japanese JIS B8 media size: 64mm x 91mm (2.52" x 3.583")
  static const JIS_B8 =
      const PrintJobMediaSize_(id: "JIS_B8", widthMils: 2520, heightMils: 3583);

  ///Japanese JIS B7 media size: 91mm x 128mm (3.583" x 5.049")
  static const JIS_B7 =
      const PrintJobMediaSize_(id: "JIS_B7", widthMils: 3583, heightMils: 5049);

  ///Japanese JIS B6 media size: 128mm x 182mm (5.049" x 7.165")
  static const JIS_B6 =
      const PrintJobMediaSize_(id: "JIS_B6", widthMils: 5049, heightMils: 7165);

  ///Japanese JIS B5 media size: 182mm x 257mm (7.165" x 10.118")
  static const JIS_B5 = const PrintJobMediaSize_(
      id: "JIS_B5", widthMils: 7165, heightMils: 10118);

  ///Japanese JIS B4 media size: 257mm x 364mm (10.118" x 14.331")
  static const JIS_B4 = const PrintJobMediaSize_(
      id: "JIS_B4", widthMils: 10118, heightMils: 14331);

  ///Japanese JIS B3 media size: 364mm x 515mm (14.331" x 20.276")
  static const JIS_B3 = const PrintJobMediaSize_(
      id: "JIS_B3", widthMils: 14331, heightMils: 20276);

  ///Japanese JIS B2 media size: 515mm x 728mm (20.276" x 28.661")
  static const JIS_B2 = const PrintJobMediaSize_(
      id: "JIS_B2", widthMils: 20276, heightMils: 28661);

  ///Japanese JIS B1 media size: 728mm x 1030mm (28.661" x 40.551")
  static const JIS_B1 = const PrintJobMediaSize_(
      id: "JIS_B1", widthMils: 28661, heightMils: 40551);

  ///Japanese JIS B0 media size: 1030mm x 1456mm (40.551" x 57.323")
  static const JIS_B0 = const PrintJobMediaSize_(
      id: "JIS_B0", widthMils: 40551, heightMils: 57323);

  ///Japanese JIS Exec media size: 216mm x 330mm (8.504" x 12.992")
  static const JIS_EXEC = const PrintJobMediaSize_(
      id: "JIS_EXEC", widthMils: 8504, heightMils: 12992);

  ///Japanese Chou4 media size: 90mm x 205mm (3.543" x 8.071")
  static const JPN_CHOU4 = const PrintJobMediaSize_(
      id: "JPN_CHOU4", widthMils: 3543, heightMils: 8071);

  ///Japanese Chou3 media size: 120mm x 235mm (4.724" x 9.252")
  static const JPN_CHOU3 = const PrintJobMediaSize_(
      id: "JPN_CHOU3", widthMils: 4724, heightMils: 9252);

  ///Japanese Chou2 media size: 111.1mm x 146mm (4.374" x 5.748")
  static const JPN_CHOU2 = const PrintJobMediaSize_(
      id: "JPN_CHOU2", widthMils: 4374, heightMils: 5748);

  ///Japanese Hagaki media size: 100mm x 148mm (3.937" x 5.827")
  static const JPN_HAGAKI = const PrintJobMediaSize_(
      id: "JPN_HAGAKI", widthMils: 3937, heightMils: 5827);

  ///Japanese Oufuku media size: 148mm x 200mm (5.827" x 7.874")
  static const JPN_OUFUKU = const PrintJobMediaSize_(
      id: "JPN_OUFUKU", widthMils: 5827, heightMils: 7874);

  ///Japanese Kahu media size: 240mm x 322.1mm (9.449" x 12.681")
  static const JPN_KAHU = const PrintJobMediaSize_(
      id: "JPN_KAHU", widthMils: 9449, heightMils: 12681);

  ///Japanese Kaku2 media size: 240mm x 332mm (9.449" x 13.071")
  static const JPN_KAKU2 = const PrintJobMediaSize_(
      id: "JPN_KAKU2", widthMils: 9449, heightMils: 13071);

  ///Japanese You4 media size: 105mm x 235mm (4.134" x 9.252")
  static const JPN_YOU4 = const PrintJobMediaSize_(
      id: "JPN_YOU4", widthMils: 4134, heightMils: 9252);

  ///Japanese Photo L media size: 89mm x 127mm (3.5 x 5")
  static const JPN_OE_PHOTO_L = const PrintJobMediaSize_(
      id: "JPN_OE_PHOTO_L", widthMils: 3500, heightMils: 5000);
}
