// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT

package sctp

type paramChunkList struct {
	paramHeader
	chunkTypes []chunkType
}

func ( *paramChunkList) () ([]byte, error) {
	.typ = chunkList
	.raw = make([]byte, len(.chunkTypes))
	for ,  := range .chunkTypes {
		.raw[] = byte()
	}

	return .paramHeader.marshal()
}

func ( *paramChunkList) ( []byte) (param, error) {
	 := .paramHeader.unmarshal()
	if  != nil {
		return nil, 
	}
	for ,  := range .raw {
		.chunkTypes = append(.chunkTypes, chunkType())
	}

	return , nil
}