import { defineComponent, createVNode } from "vue";
import { BORDER_TOP } from "../utils/constant.mjs";
import { useChildren } from "../../../@vant/use/dist/index.esm.mjs";
import { makeNumericProp, numericProp, truthProp } from "../utils/props.mjs";
import { createNamespace } from "../utils/create.mjs";
import { addUnit } from "../utils/format.mjs";
const [name, bem] = createNamespace("grid");
const gridProps = {
  square: Boolean,
  center: truthProp,
  border: truthProp,
  gutter: numericProp,
  reverse: Boolean,
  iconSize: numericProp,
  direction: String,
  clickable: Boolean,
  columnNum: makeNumericProp(4)
};
const GRID_KEY = Symbol(name);
var stdin_default = defineComponent({
  name,
  props: gridProps,
  setup(props, {
    slots
  }) {
    const {
      linkChildren
    } = useChildren(GRID_KEY);
    linkChildren({
      props
    });
    return () => {
      var _a;
      return createVNode("div", {
        "style": {
          paddingLeft: addUnit(props.gutter)
        },
        "class": [bem(), {
          [BORDER_TOP]: props.border && !props.gutter
        }]
      }, [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
    };
  }
});
export {
  GRID_KEY,
  stdin_default as default,
  gridProps
};
