"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseSvg = void 0;
const svgson_1 = require("svgson");
// Parse SVG string to a structured object
const parseSvg = (svgString) => {
    const parsed = (0, svgson_1.parseSync)(svgString);
    return {
        viewBox: parsed.attributes.viewBox ||
            `0 0 ${parsed.attributes.width} ${parsed.attributes.height}`,
        paths: parsed.children
            .filter(child => child.name === 'path')
            .map(path => ({
            d: path.attributes.d,
            ...path.attributes,
        })),
    };
};
exports.parseSvg = parseSvg;
//# sourceMappingURL=svgs.js.map