"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// packages/style-engine/src/styles/border/index.ts
var border_exports = {};
__export(border_exports, {
  default: () => border_default
});
module.exports = __toCommonJS(border_exports);
var import_utils = require("../utils.cjs");
function createBorderGenerateFunction(path) {
  return (style, options) => (0, import_utils.generateRule)(style, options, path, (0, import_utils.camelCaseJoin)(path));
}
function createBorderEdgeGenerateFunction(edge) {
  return (style, options) => {
    return ["color", "style", "width"].flatMap((key) => {
      const path = ["border", edge, key];
      return createBorderGenerateFunction(path)(style, options);
    });
  };
}
var color = {
  name: "color",
  generate: createBorderGenerateFunction(["border", "color"])
};
var radius = {
  name: "radius",
  generate: (style, options) => {
    return (0, import_utils.generateBoxRules)(
      style,
      options,
      ["border", "radius"],
      {
        default: "borderRadius",
        individual: "border%sRadius"
      },
      ["topLeft", "topRight", "bottomLeft", "bottomRight"]
    );
  }
};
var borderStyle = {
  name: "style",
  generate: createBorderGenerateFunction(["border", "style"])
};
var width = {
  name: "width",
  generate: createBorderGenerateFunction(["border", "width"])
};
var borderTop = {
  name: "borderTop",
  generate: createBorderEdgeGenerateFunction("top")
};
var borderRight = {
  name: "borderRight",
  generate: createBorderEdgeGenerateFunction("right")
};
var borderBottom = {
  name: "borderBottom",
  generate: createBorderEdgeGenerateFunction("bottom")
};
var borderLeft = {
  name: "borderLeft",
  generate: createBorderEdgeGenerateFunction("left")
};
var border_default = [
  color,
  borderStyle,
  width,
  radius,
  borderTop,
  borderRight,
  borderBottom,
  borderLeft
];
//# sourceMappingURL=index.cjs.map
