import React from 'react';
import { isArrayCount } from "../../utils";
import { DefaultWrapperDiv, SpaceBetweenWrapperDiv } from './styled';
import { TypeUIAdaptive } from './types';
const VARIANTS = {
    default: DefaultWrapperDiv,
    spaceBetween: SpaceBetweenWrapperDiv,
};
export const UIAdaptive = React.forwardRef(({ children, options, breakpoints, type = TypeUIAdaptive.default, indents = true, }, ref) => {
    const { colInit, widthBlocks } = options;
    if (colInit !== isArrayCount(widthBlocks)) {
        console.error('incorrectly specified block width in UIAdaptive');
        return null;
    }
    const Wrapper = VARIANTS[type];
    return (React.createElement(Wrapper, { ref: ref, className: "assessment-adaptive-wrapper", options: options, breakpoints: breakpoints, indents: indents, type: type }, children));
});
