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

package sctp

type paramSupportedExtensions struct {
	paramHeader
	ChunkTypes []chunkType
}

func ( *paramSupportedExtensions) () ([]byte, error) {
	.typ = supportedExt
	.raw = make([]byte, len(.ChunkTypes))
	for ,  := range .ChunkTypes {
		.raw[] = byte()
	}

	return .paramHeader.marshal()
}

func ( *paramSupportedExtensions) ( []byte) (param, error) {
	 := .paramHeader.unmarshal()
	if  != nil {
		return nil, 
	}

	for ,  := range .raw {
		.ChunkTypes = append(.ChunkTypes, chunkType())
	}

	return , nil
}