"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Col_exports = {};
__export(Col_exports, {
  default: () => Col_default
});
module.exports = __toCommonJS(Col_exports);
var import_prop_types = require("prop-types");
var import_styled_components = __toESM(require("styled-components"));
var import_yoga_tokens = __toESM(require("@gympass/yoga-tokens"));
var import_yoga_helpers = require("@gympass/yoga-helpers");
const { breakpoints } = import_yoga_tokens.default;
const columnPosition = (props) => {
  const breakpointKeys = Object.keys(breakpoints);
  const position = breakpointKeys.filter((breakpoint) => props[breakpoint]).map(
    (filteredBreakpoint) => import_yoga_helpers.media[filteredBreakpoint]`
        grid-column-end: span ${props[filteredBreakpoint] || 12};
      `
  );
  const starts = breakpointKeys.filter((breakpoint) => props[`${breakpoint}-start`]).map(
    (start) => import_yoga_helpers.media[start]`
        grid-column-start: ${props[`${start}-start`]};
      `
  );
  return [...position, ...starts];
};
const hideColumn = (hideProp) => hideProp.map((breakpoint) => import_yoga_helpers.media.hide[breakpoint]);
const Col = import_styled_components.default.div`
  box-sizing: border-box;

  min-width: 0;
  min-height: 0;

  ${(props) => columnPosition(props)}

  ${({ hide }) => hide ? hideColumn(hide) : ""}
`;
Col.propTypes = {
  hide: (0, import_prop_types.arrayOf)((0, import_prop_types.oneOf)(["xxs", "xs", "sm", "md", "lg", "xl", "xxl", "xxxl"])),
  xxs: import_prop_types.number,
  xs: import_prop_types.number,
  sm: import_prop_types.number,
  md: import_prop_types.number,
  lg: import_prop_types.number,
  xl: import_prop_types.number,
  xxl: import_prop_types.number,
  xxxl: import_prop_types.number,
  "xxs-start": import_prop_types.number,
  "xs-start": import_prop_types.number,
  "sm-start": import_prop_types.number,
  "md-start": import_prop_types.number,
  "lg-start": import_prop_types.number,
  "xl-start": import_prop_types.number,
  "xxl-start": import_prop_types.number,
  "xxxl-start": import_prop_types.number
};
var Col_default = Col;
