use edifact_rs::{ComponentRef, ElementRef, SegmentDefinition, Status};
use Status::{Conditional as C, Mandatory as M};
const C002: &[ComponentRef] = &[ComponentRef::new(1, "1001", C)];
const C106: &[ComponentRef] = &[ComponentRef::new(1, "1004", C)];
const C507: &[ComponentRef] = &[
ComponentRef::new(1, "2005", M),
ComponentRef::new(2, "2380", C),
ComponentRef::new(3, "2379", C),
];
const C082: &[ComponentRef] = &[
ComponentRef::new(1, "3039", M),
ComponentRef::new(2, "1131", C),
ComponentRef::new(3, "3055", C),
];
const C058: &[ComponentRef] = &[ComponentRef::repeated(1, "3124", C, 5)];
const C080: &[ComponentRef] = &[ComponentRef::repeated(1, "3036", M, 5)];
const C506: &[ComponentRef] = &[
ComponentRef::new(1, "1153", M),
ComponentRef::new(2, "1154", C),
];
const C206: &[ComponentRef] = &[ComponentRef::new(1, "7402", C)];
const C517: &[ComponentRef] = &[
ComponentRef::new(1, "3225", C),
ComponentRef::new(2, "1131", C),
ComponentRef::new(3, "3055", C),
ComponentRef::new(4, "3224", C),
];
const C901: &[ComponentRef] = &[ComponentRef::new(1, "9321", M)];
const C107: &[ComponentRef] = &[ComponentRef::new(1, "4441", M)];
const C108: &[ComponentRef] = &[ComponentRef::repeated(1, "4440", M, 5)];
const C186: &[ComponentRef] = &[
ComponentRef::new(1, "6063", M),
ComponentRef::new(2, "6060", M),
ComponentRef::new(3, "6411", C),
];
const C212: &[ComponentRef] = &[
ComponentRef::new(1, "7140", C),
ComponentRef::new(2, "7143", C),
];
const C502: &[ComponentRef] = &[ComponentRef::new(1, "6313", C)];
const C240: &[ComponentRef] = &[ComponentRef::new(1, "7037", M)];
const C601: &[ComponentRef] = &[ComponentRef::new(1, "9015", M)];
const C555: &[ComponentRef] = &[ComponentRef::new(1, "4405", M)];
const C556: &[ComponentRef] = &[
ComponentRef::new(1, "9013", M),
ComponentRef::new(2, "1131", C),
];
const C056: &[ComponentRef] = &[
ComponentRef::new(1, "3413", C),
ComponentRef::new(2, "3412", C),
];
const C076: &[ComponentRef] = &[
ComponentRef::new(1, "3148", M),
ComponentRef::new(2, "3155", M),
];
const BGM_ELEMENTS: &[ElementRef] = &[
ElementRef::composite(1, "C002", C, 1, C002),
ElementRef::composite(2, "C106", C, 1, C106),
ElementRef::new(3, "1225", C, 1),
];
pub const BGM: SegmentDefinition =
SegmentDefinition::new("BGM", "Beginn der Nachricht", BGM_ELEMENTS);
const DTM_ELEMENTS: &[ElementRef] = &[ElementRef::composite(1, "C507", M, 1, C507)];
pub const DTM: SegmentDefinition =
SegmentDefinition::new("DTM", "Datum/Uhrzeit/Zeitspanne", DTM_ELEMENTS);
const NAD_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "3035", M, 1),
ElementRef::composite(2, "C082", C, 1, C082),
ElementRef::composite(3, "C058", C, 1, C058),
ElementRef::composite(4, "C080", C, 1, C080),
];
pub const NAD: SegmentDefinition = SegmentDefinition::new("NAD", "Name und Adresse", NAD_ELEMENTS);
const RFF_ELEMENTS: &[ElementRef] = &[ElementRef::composite(1, "C506", M, 1, C506)];
pub const RFF: SegmentDefinition = SegmentDefinition::new("RFF", "Referenz", RFF_ELEMENTS);
const IDE_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "7495", M, 1),
ElementRef::composite(2, "C206", C, 1, C206),
];
pub const IDE: SegmentDefinition = SegmentDefinition::new("IDE", "Identifikation", IDE_ELEMENTS);
const LOC_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "3227", M, 1),
ElementRef::composite(2, "C517", C, 1, C517),
];
pub const LOC: SegmentDefinition = SegmentDefinition::new("LOC", "Ortsangabe", LOC_ELEMENTS);
const ERC_ELEMENTS: &[ElementRef] = &[ElementRef::composite(1, "C901", M, 1, C901)];
pub const ERC: SegmentDefinition = SegmentDefinition::new("ERC", "Anwendungsfehler", ERC_ELEMENTS);
const FTX_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "4451", M, 1),
ElementRef::new(2, "4453", C, 1),
ElementRef::composite(3, "C107", C, 1, C107),
ElementRef::composite(4, "C108", C, 1, C108),
];
pub const FTX: SegmentDefinition = SegmentDefinition::new("FTX", "Freier Text", FTX_ELEMENTS);
const QTY_ELEMENTS: &[ElementRef] = &[ElementRef::composite(1, "C186", M, 1, C186)];
pub const QTY: SegmentDefinition = SegmentDefinition::new("QTY", "Mengenangaben", QTY_ELEMENTS);
const LIN_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "1082", C, 1),
ElementRef::new(2, "1229", C, 1),
];
pub const LIN: SegmentDefinition = SegmentDefinition::new("LIN", "Positionsdaten", LIN_ELEMENTS);
const PIA_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "4347", M, 1),
ElementRef::composite(2, "C212", M, 1, C212),
];
pub const PIA: SegmentDefinition =
SegmentDefinition::new("PIA", "Zusätzliche Produkt-ID", PIA_ELEMENTS);
const CCI_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "7059", C, 1),
ElementRef::composite(2, "C502", C, 1, C502),
ElementRef::composite(3, "C240", C, 1, C240),
];
pub const CCI: SegmentDefinition = SegmentDefinition::new("CCI", "Merkmal/Klasse", CCI_ELEMENTS);
const STS_ELEMENTS: &[ElementRef] = &[
ElementRef::composite(1, "C601", C, 1, C601),
ElementRef::composite(2, "C555", C, 1, C555),
ElementRef::composite(3, "C556", C, 1, C556),
];
pub const STS: SegmentDefinition = SegmentDefinition::new("STS", "Status", STS_ELEMENTS);
const CTA_ELEMENTS: &[ElementRef] = &[
ElementRef::new(1, "3139", C, 1),
ElementRef::composite(2, "C056", C, 1, C056),
];
pub const CTA: SegmentDefinition = SegmentDefinition::new("CTA", "Ansprechpartner", CTA_ELEMENTS);
const COM_ELEMENTS: &[ElementRef] = &[ElementRef::composite(1, "C076", M, 1, C076)];
pub const COM: SegmentDefinition =
SegmentDefinition::new("COM", "Kommunikationsverbindung", COM_ELEMENTS);