import { MIN_COLUMN_WIDTH as i } from "../tableSizing.constants.js";
const o = (t) => {
  if (t !== void 0)
    return typeof t == "number" ? `${t}px` : t;
}, m = (t) => t.trim().endsWith("%"), c = (t) => {
  const r = Number.parseFloat(t);
  return Number.isFinite(r) ? r : void 0;
}, u = (t, r) => {
  const n = o(t.width);
  if (n) {
    if (m(n)) {
      const e = c(n);
      return e !== void 0 ? `minmax(0, calc(var(--table-width) * ${e} / 100))` : `minmax(0, ${n})`;
    }
    return `minmax(0, ${n})`;
  }
  return r ? `minmax(${i}, ${r})` : `minmax(${i}, 1fr)`;
};
export {
  u as getColumnTrack,
  o as toCssSize
};
//# sourceMappingURL=columnSizing.js.map
