"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parsePadding = void 0;
const assert = require("../util/assert");
function parsePadding(padding) {
    const parts = padding.split(' ');
    const top = parseInt(parts[0], 10);
    const right = parseInt(parts[1] || parts[0], 10);
    const bottom = parseInt(parts[2] || parts[0], 10);
    const left = parseInt(parts[3] || parts[1] || parts[0], 10);
    return { top, right, bottom, left };
}
exports.parsePadding = parsePadding;
assert.deepEqual(parsePadding('10px'), {
    top: 10,
    right: 10,
    bottom: 10,
    left: 10,
});
assert.deepEqual(parsePadding('10px 10px 5px 5px'), {
    top: 10,
    right: 10,
    bottom: 5,
    left: 5,
});
//# sourceMappingURL=parsePadding.js.map