import { CommonSliceType } from '../slice';
import { SliceStacking } from '../slice/constants';
export const h = (tag, props, ...children) => {
    const attrs = {};
    if (props)
        attrs.data = props;
    if (tag === h)
        return ['', null, ...children];
    const num = CommonSliceType[tag];
    if (typeof num === 'number') {
        const inline = num < 0;
        attrs.inline = inline;
        attrs.stacking = inline ? (props ? SliceStacking.Many : SliceStacking.One) : SliceStacking.Marker;
        return [num, attrs, ...children];
    }
    else {
        const inline = !props;
        attrs.inline = inline;
        attrs.stacking = inline ? (props ? SliceStacking.Many : SliceStacking.One) : SliceStacking.Marker;
        return [tag, attrs, ...children];
    }
};
//# sourceMappingURL=jsx.js.map