import { jsx as o } from "react/jsx-runtime";
import { isValidElement as C, Children as t } from "react";
import { c as z } from "./bind-CU-R61T-.mjs";
const h = {
  "purpur-grid-item": "_purpur-grid-item_zx9tz_1",
  "purpur-grid-item--no-col-gap": "_purpur-grid-item--no-col-gap_zx9tz_6",
  "purpur-grid-item-colspan-sm-4": "_purpur-grid-item-colspan-sm-4_zx9tz_24",
  "purpur-grid-item-colspan-sm-3": "_purpur-grid-item-colspan-sm-3_zx9tz_27",
  "purpur-grid-item-colspan-sm-2": "_purpur-grid-item-colspan-sm-2_zx9tz_30",
  "purpur-grid-item-colspan-sm-1": "_purpur-grid-item-colspan-sm-1_zx9tz_33",
  "purpur-grid-item-colspan-md-8": "_purpur-grid-item-colspan-md-8_zx9tz_37",
  "purpur-grid-item-colspan-md-7": "_purpur-grid-item-colspan-md-7_zx9tz_42",
  "purpur-grid-item-colspan-md-6": "_purpur-grid-item-colspan-md-6_zx9tz_47",
  "purpur-grid-item-colspan-md-5": "_purpur-grid-item-colspan-md-5_zx9tz_52",
  "purpur-grid-item-colspan-md-4": "_purpur-grid-item-colspan-md-4_zx9tz_57",
  "purpur-grid-item-colspan-md-3": "_purpur-grid-item-colspan-md-3_zx9tz_62",
  "purpur-grid-item-colspan-md-2": "_purpur-grid-item-colspan-md-2_zx9tz_67",
  "purpur-grid-item-colspan-md-1": "_purpur-grid-item-colspan-md-1_zx9tz_72",
  "purpur-grid-item-colspan-lg-12": "_purpur-grid-item-colspan-lg-12_zx9tz_77",
  "purpur-grid-item-colspan-lg-11": "_purpur-grid-item-colspan-lg-11_zx9tz_82",
  "purpur-grid-item-colspan-lg-10": "_purpur-grid-item-colspan-lg-10_zx9tz_87",
  "purpur-grid-item-colspan-lg-9": "_purpur-grid-item-colspan-lg-9_zx9tz_92",
  "purpur-grid-item-colspan-lg-8": "_purpur-grid-item-colspan-lg-8_zx9tz_97",
  "purpur-grid-item-colspan-lg-7": "_purpur-grid-item-colspan-lg-7_zx9tz_102",
  "purpur-grid-item-colspan-lg-6": "_purpur-grid-item-colspan-lg-6_zx9tz_107",
  "purpur-grid-item-colspan-lg-5": "_purpur-grid-item-colspan-lg-5_zx9tz_112",
  "purpur-grid-item-colspan-lg-4": "_purpur-grid-item-colspan-lg-4_zx9tz_117",
  "purpur-grid-item-colspan-lg-3": "_purpur-grid-item-colspan-lg-3_zx9tz_122",
  "purpur-grid-item-colspan-lg-2": "_purpur-grid-item-colspan-lg-2_zx9tz_127",
  "purpur-grid-item-colspan-lg-1": "_purpur-grid-item-colspan-lg-1_zx9tz_77"
}, y = z.bind(h), n = "purpur-grid-item", c = ({
  children: p,
  className: m,
  colSpanSm: g = 4,
  colSpanMd: i = 8,
  colSpanLg: u = 12,
  noColGap: l = !1,
  ...d
}) => {
  const e = y([
    n,
    {
      [`${n}--no-col-gap`]: l,
      [`${n}-colspan-sm-${g}`]: g,
      [`${n}-colspan-md-${i}`]: i,
      [`${n}-colspan-lg-${u}`]: u
    },
    m
  ]);
  return /* @__PURE__ */ o("div", { className: e, ...d, children: p });
}, I = (p) => !!p && C(p) && p.type === c;
c.displayName = "Grid.Item";
const w = {
  "purpur-grid": "_purpur-grid_8kjv6_1",
  "purpur-grid__inner": "_purpur-grid__inner_8kjv6_27",
  "purpur-grid__inner--no-gap": "_purpur-grid__inner--no-gap_8kjv6_32",
  "purpur-grid__inner--no-row-gap": "_purpur-grid__inner--no-row-gap_8kjv6_32",
  "purpur-grid__inner--grid": "_purpur-grid__inner--grid_8kjv6_50",
  "purpur-grid__inner--no-col-gap": "_purpur-grid__inner--no-col-gap_8kjv6_54",
  "purpur-grid__inner-col-sm-4": "_purpur-grid__inner-col-sm-4_8kjv6_57",
  "purpur-grid__inner-col-sm-3": "_purpur-grid__inner-col-sm-3_8kjv6_60",
  "purpur-grid__inner-col-sm-2": "_purpur-grid__inner-col-sm-2_8kjv6_63",
  "purpur-grid__inner-col-md-8": "_purpur-grid__inner-col-md-8_8kjv6_67",
  "purpur-grid__inner-col-md-7": "_purpur-grid__inner-col-md-7_8kjv6_72",
  "purpur-grid__inner-col-md-6": "_purpur-grid__inner-col-md-6_8kjv6_77",
  "purpur-grid__inner-col-md-5": "_purpur-grid__inner-col-md-5_8kjv6_82",
  "purpur-grid__inner-col-md-4": "_purpur-grid__inner-col-md-4_8kjv6_87",
  "purpur-grid__inner-col-md-3": "_purpur-grid__inner-col-md-3_8kjv6_92",
  "purpur-grid__inner-col-md-2": "_purpur-grid__inner-col-md-2_8kjv6_97",
  "purpur-grid__inner-col-lg-12": "_purpur-grid__inner-col-lg-12_8kjv6_102",
  "purpur-grid__inner-col-lg-11": "_purpur-grid__inner-col-lg-11_8kjv6_107",
  "purpur-grid__inner-col-lg-10": "_purpur-grid__inner-col-lg-10_8kjv6_112",
  "purpur-grid__inner-col-lg-9": "_purpur-grid__inner-col-lg-9_8kjv6_117",
  "purpur-grid__inner-col-lg-8": "_purpur-grid__inner-col-lg-8_8kjv6_122",
  "purpur-grid__inner-col-lg-7": "_purpur-grid__inner-col-lg-7_8kjv6_127",
  "purpur-grid__inner-col-lg-6": "_purpur-grid__inner-col-lg-6_8kjv6_132",
  "purpur-grid__inner-col-lg-5": "_purpur-grid__inner-col-lg-5_8kjv6_137",
  "purpur-grid__inner-col-lg-4": "_purpur-grid__inner-col-lg-4_8kjv6_142",
  "purpur-grid__inner-col-lg-3": "_purpur-grid__inner-col-lg-3_8kjv6_147",
  "purpur-grid__inner-col-lg-2": "_purpur-grid__inner-col-lg-2_8kjv6_152",
  "purpur-grid__inner--flex": "_purpur-grid__inner--flex_8kjv6_156"
}, a = z.bind(w), G = "purpur-grid", r = "purpur-grid__inner", x = ({
  children: p,
  className: m,
  containerClassName: g,
  colsSm: i = 1,
  colsMd: u = 1,
  colsLg: l = 1,
  noGap: d = !1,
  noColGap: e = !1,
  noRowGap: v = !1,
  ...j
}) => {
  const s = t.toArray(p).filter(I), _ = !!s.length, k = a([G, g]), $ = a([
    r,
    {
      [`${r}--grid`]: !_,
      [`${r}--flex`]: _,
      [`${r}--no-gap`]: d,
      [`${r}--no-col-gap`]: e,
      [`${r}--no-row-gap`]: v,
      [`${r}-col-sm-${i}`]: i > 1 && !_,
      [`${r}-col-md-${u}`]: u > 1 && !_,
      [`${r}-col-lg-${l}`]: l > 1 && !_
    },
    m
  ]);
  return /* @__PURE__ */ o("div", { className: k, ...j, children: /* @__PURE__ */ o("div", { className: $, children: _ ? t.map(s, ({ props: { children: f, ...N } }) => /* @__PURE__ */ o(c, { ...N, noColGap: d || e, children: f })) : p }) });
};
x.displayName = "Grid";
x.Item = c;
export {
  x as G
};
//# sourceMappingURL=grid-DGnCQgwf.mjs.map
