import { Optional } from '@ephox/katamari';
import { Css } from '@ephox/sugar';
const NuPositionCss = (position, left, top, right, bottom) => {
    const toPx = (num) => num + 'px';
    return {
        position,
        left: left.map(toPx),
        top: top.map(toPx),
        right: right.map(toPx),
        bottom: bottom.map(toPx)
    };
};
const toOptions = (position) => ({
    ...position,
    position: Optional.some(position.position)
});
const applyPositionCss = (element, position) => {
    Css.setOptions(element, toOptions(position));
};
export { NuPositionCss, applyPositionCss };
//# sourceMappingURL=PositionCss.js.map