export function defineComponent(definition) {
    const renderModes = definition.renderModes ?? definition.render;
    if (!renderModes) {
        throw new Error(`component ${definition.name} must define renderModes`);
    }
    return {
        ...definition,
        renderModes,
        render: renderModes,
        varyDimensions: definition.varyDimensions ?? definition.vary,
        vary: definition.vary ?? definition.varyDimensions,
    };
}
export const defineComponentContract = defineComponent;
