import {
  ROW_KEY
} from "./chunk-HNSJR2AM.js";
import {
  createNamespace,
  extend,
  makeNumericProp,
  makeStringProp,
  numericProp,
  useParent,
  withInstall
} from "./chunk-VTNTUAMG.js";

// ../../../../../ProjectSpace/UniAppSpace/nurseapp_v3/node_modules/vant/es/col/Col.mjs
import { computed, defineComponent, createVNode as _createVNode } from "vue";
var [name, bem] = createNamespace("col");
var colProps = {
  tag: makeStringProp("div"),
  span: makeNumericProp(0),
  offset: numericProp
};
var stdin_default = defineComponent({
  name,
  props: colProps,
  setup(props, {
    slots
  }) {
    const {
      parent,
      index
    } = useParent(ROW_KEY);
    const style = computed(() => {
      if (!parent) {
        return;
      }
      const {
        spaces,
        verticalSpaces
      } = parent;
      let styles = {};
      if (spaces && spaces.value && spaces.value[index.value]) {
        const {
          left,
          right
        } = spaces.value[index.value];
        styles = {
          paddingLeft: left ? `${left}px` : null,
          paddingRight: right ? `${right}px` : null
        };
      }
      const {
        bottom
      } = verticalSpaces.value[index.value] || {};
      return extend(styles, {
        marginBottom: bottom ? `${bottom}px` : null
      });
    });
    return () => {
      const {
        tag,
        span,
        offset
      } = props;
      return _createVNode(tag, {
        "style": style.value,
        "class": bem({
          [span]: span,
          [`offset-${offset}`]: offset
        })
      }, {
        default: () => {
          var _a;
          return [(_a = slots.default) == null ? void 0 : _a.call(slots)];
        }
      });
    };
  }
});

// ../../../../../ProjectSpace/UniAppSpace/nurseapp_v3/node_modules/vant/es/col/index.mjs
var Col = withInstall(stdin_default);
var stdin_default2 = Col;

export {
  colProps,
  Col,
  stdin_default2 as stdin_default
};
//# sourceMappingURL=chunk-4UQKFJH2.js.map
