const r = {
  mainStrokeColor: "brand-info",
  mainFillColor: "color-highlight-lighter",
  secondaryStrokeColor: "gray",
  backgroundFillColor: "gray-lighter"
}, k = (t) => t.replace(/\s+/g, "").toLowerCase(), C = (t) => t.split(";").reduce((o, a) => {
  const [s, e] = a.split(":").map((i) => i.trim());
  return s && e && (o[m(s)] = e), o;
}, {}), m = (t) => t.replace(/-([a-z])/g, (o, a) => a.toUpperCase()), p = {
  "xml:space": "xmlSpace",
  "xmlns:xlink": "xmlnsXlink",
  "stroke-width": "strokeWidth",
  "fill-opacity": "fillOpacity",
  "stroke-opacity": "strokeOpacity",
  "clip-path": "clipPath"
}, g = (t, o) => {
  const a = {}, s = t.attributes, e = {
    // Main fill color
    "rgb(207, 240, 243)": `var(--${o.mainFillColor || r.mainFillColor})`,
    "#cff0f3": `var(--${o.mainFillColor || r.mainFillColor})`,
    // Main stroke color
    "rgb(75, 128, 166)": `var(--${o.mainStrokeColor || r.mainStrokeColor})`,
    "#4b80a6": `var(--${o.mainStrokeColor || r.mainStrokeColor})`,
    // Secondary stroke color (gray elements)
    "rgb(188, 192, 196)": `var(--${o.secondaryStrokeColor || r.secondaryStrokeColor})`,
    "#bcc0c4": `var(--${o.secondaryStrokeColor || r.secondaryStrokeColor})`,
    // Background fill color
    "rgb(233, 235, 236)": `var(--${o.backgroundFillColor || r.backgroundFillColor})`,
    "#e9ebec": `var(--${o.backgroundFillColor || r.backgroundFillColor})`,
    // Static colors that don't change
    "rgb(255, 255, 255)": "var(--color-white)",
    "#fff": "var(--color-white)",
    "#ffffff": "var(--color-white)"
  };
  for (const i of s) {
    const c = p[i.name] || i.name;
    let n = i.value;
    if (c === "style") {
      const l = C(n);
      if (l.fill) {
        const f = k(l.fill);
        l.fill = e[f] || l.fill;
      }
      if (l.stroke) {
        const f = k(l.stroke);
        l.stroke = e[f] || l.stroke;
      }
      a.style = l;
    } else {
      if (c === "fill" || c === "stroke") {
        const l = k(n);
        n = e[l] || n;
      }
      a[c] = n;
    }
  }
  return a;
};
export {
  m as camelCase,
  g as convertAttributes,
  r as defaultColorMap,
  C as parseStyleString
};
//# sourceMappingURL=svgConverter.js.map
