import { newRecruitJsonSerializer } from "./newrecruit-json.js";
import { newRecruitSimpleSerializer } from "./newrecruit-simple.js";
import { newRecruitWtcCompactSerializer, newRecruitWtcFullSerializer, } from "./newrecruit-wtc.js";
import { rosterJsonSerializer } from "./roster-json.js";
import { rosterizerSerializer } from "./rosterizer.js";
export { newRecruitJsonSerializer } from "./newrecruit-json.js";
export { newRecruitSimpleSerializer } from "./newrecruit-simple.js";
export { newRecruitWtcCompactSerializer, newRecruitWtcFullSerializer, } from "./newrecruit-wtc.js";
export { rosterJsonSerializer } from "./roster-json.js";
export { rosterizerSerializer } from "./rosterizer.js";
/** All registered serializers, keyed by their {@link ExportFormat} id. */
const SERIALIZERS = [
    newRecruitJsonSerializer,
    newRecruitWtcCompactSerializer,
    newRecruitWtcFullSerializer,
    newRecruitSimpleSerializer,
    rosterJsonSerializer,
    rosterizerSerializer,
];
/** Serialize a {@link Roster} into the named target format. */
export function exportRoster(roster, format) {
    const s = SERIALIZERS.find((s) => s.id === format);
    if (!s) {
        throw new Error(`unknown export format: ${format} (registered: ${SERIALIZERS.map((s) => s.id).join(", ")})`);
    }
    return s.serialize(roster);
}
//# sourceMappingURL=index.js.map