'use strict' ; import { X12SegmentHeader , GSSegmentHeader , ISASegmentHeader , STSegmentHeader } from './X12SegmentHeader' ; export type TxEngine = 'liquidjs' | 'internal' ; description typedef X12SerializationOptions property { string } elementDelimiter property { string } endOfLine property { boolean } format property { string } segmentTerminator property { string } subElementDelimiter property { X12SegmentHeader [ ] } segmentHeaders property { 'liquidjs' | 'internal' } txEngine /**
 * Class instance wrapper for serialization options.
 */ export class X12SerializationOptions { constructor ( options = { } ) { this . elementDelimiter = options . elementDelimiter === undefined ? '*' : options . elementDelimiter ; this . endOfLine = options . endOfLine === undefined ? '\n' : options . endOfLine ; this . format = options . format === undefined ? false : options . format ; this . segmentTerminator = options . segmentTerminator === undefined ? '~' : options . segmentTerminator ; this . subElementDelimiter = options . subElementDelimiter === undefined ? '>' : options . subElementDelimiter ; this . repetitionDelimiter = options . repetitionDelimiter === undefined ? '^' : options . repetitionDelimiter ; this . segmentHeaders = options . segmentHeaders === undefined ? [ GSSegmentHeader , ISASegmentHeader , STSegmentHeader ] : options . segmentHeaders ; this . txEngine = options . txEngine === undefined ? 'internal' : options . txEngine ; if ( this . segmentTerminator === '\n' ) { this . endOfLine = '' ; } } elementDelimiter ? : string ; endOfLine ? : string ; format ? : boolean ; segmentTerminator ? : string ; subElementDelimiter ? : string ; repetitionDelimiter ? : string ; segmentHeaders ? : X12SegmentHeader [ ] ; txEngine ? : TxEngine ; } description param { X12SerializationOptions } options returns { X12SerializationOptions } export function defaultSerializationOptions ( options ? ) { return new X12SerializationOptions ( options ) ; }