"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);

// src/components/Flex/propUtils.ts
var propUtils_exports = {};
__export(propUtils_exports, {
  buildFlexStyles: () => buildFlexStyles,
  splitProps: () => splitProps
});
module.exports = __toCommonJS(propUtils_exports);

// src/utils/filterUndefinedProps.ts
var filterUndefinedProps = (props) => {
  const filteredProps = {};
  Object.keys(props).forEach((key) => {
    if (props[key] !== void 0) {
      filteredProps[key] = props[key];
    }
  });
  return filteredProps;
};

// src/utils/getSpacingValue.ts
var getSpacingValue = (padding) => {
  if (typeof padding === "string") {
    return `var(--size-${padding})`;
  }
  if (typeof padding === "number") {
    return `${padding}px`;
  }
  return void 0;
};

// src/components/Flex/propUtils.ts
var buildFlexStyles = (props) => {
  const {
    flexDirection,
    flexWrap,
    flexGrow,
    flex,
    justifyContent,
    alignItems,
    alignContent,
    gap,
    rowGap,
    columnGap
  } = props;
  const styleProps = {
    flexDirection,
    flexWrap,
    flexGrow,
    flex,
    justifyContent,
    alignItems,
    alignContent,
    gap: getSpacingValue(gap),
    columnGap: getSpacingValue(columnGap),
    rowGap: getSpacingValue(rowGap)
  };
  return filterUndefinedProps(styleProps);
};
var splitProps = (props) => {
  const {
    flexDirection,
    flexWrap,
    flexGrow,
    flex,
    justifyContent,
    alignItems,
    alignContent,
    gap,
    rowGap,
    columnGap,
    ...otherProps
  } = props;
  return [
    {
      flexDirection,
      flexWrap,
      flexGrow,
      flex,
      justifyContent,
      alignItems,
      alignContent,
      gap,
      rowGap,
      columnGap
    },
    otherProps
  ];
};
//# sourceMappingURL=propUtils.js.map
