import { IAmfAnyTypes, IAmfArrayTypes, IAmfFileTypes, IAmfNodeTypes, IAmfPropertyTypes, IAmfRecursiveTypes, IAmfScalarTypes, IAmfTupleTypes, IAmfUnionTypes, IAmfXmlSerializationTypes, } from '../AmfTypes.js';
export function xmlSerializer(id) {
    return {
        id: `xml-serializer-${id}`,
        types: IAmfXmlSerializationTypes,
        customDomainProperties: [],
    };
}
export function shape(id) {
    const result = {
        id,
        types: [],
        values: [],
        inherits: [],
        or: [],
        and: [],
        xone: [],
        customDomainProperties: [],
    };
    return result;
}
export function anyShape(id) {
    const result = {
        ...shape(id),
        types: IAmfAnyTypes,
        examples: [],
        xmlSerialization: xmlSerializer(id),
    };
    return result;
}
export function nodeShape(id) {
    const result = anyShape(id);
    result.types = IAmfNodeTypes;
    result.id = `node-shape-${id}`;
    return {
        ...result,
        properties: [],
        dependencies: [],
        customShapeProperties: [],
        customShapePropertyDefinitions: [],
    };
}
export function scalarShape(id) {
    const result = anyShape(id);
    result.id = `scalar-shape-${id}`;
    result.types = IAmfScalarTypes;
    return result;
}
export function unionShape(id) {
    const result = anyShape(id);
    result.id = `union-shape-${id}`;
    result.types = IAmfUnionTypes;
    return { ...result, anyOf: [] };
}
export function fileShape(id) {
    const result = anyShape(id);
    result.id = `file-shape-${id}`;
    result.types = IAmfFileTypes;
    return result;
}
export function arrayShape(id) {
    const result = anyShape(id);
    result.id = `array-shape-${id}`;
    result.types = IAmfArrayTypes;
    return result;
}
export function tupleShape(id) {
    const result = anyShape(id);
    result.id = `tuple-shape-${id}`;
    result.types = IAmfTupleTypes;
    return { ...result, items: [] };
}
export function propertyShape(id) {
    const result = anyShape(id);
    result.types = IAmfPropertyTypes;
    return result;
}
export function recursiveShape(id, fixedId) {
    const result = {
        ...shape(id),
        id: `recursive-${id}`,
        types: IAmfRecursiveTypes,
        fixPoint: fixedId || '',
    };
    return result;
}
//# sourceMappingURL=Shapes.js.map