import { rem } from "../../../../utils/units-converters/rem.mjs";
import "react";
import "react/jsx-runtime";
import { colorResolver } from "../color-resolver/color-resolver.mjs";
function borderResolver(value, theme) {
  if (typeof value === "number") {
    return rem(value);
  }
  if (typeof value === "string") {
    const [size, style, ...colorTuple] = value.split(" ").filter((val) => val.trim() !== "");
    let result = `${rem(size)}`;
    style && (result += ` ${style}`);
    colorTuple.length > 0 && (result += ` ${colorResolver(colorTuple.join(" "), theme)}`);
    return result.trim();
  }
  return value;
}
export {
  borderResolver
};
