import {
  addUnit,
  createNamespace,
  extend,
  getSizeStyle,
  makeStringProp,
  numericProp,
  withInstall
} from "./chunk-6TMJMNX7.js";

// ../../../../../ProjectSpace/UniAppSpace/nurseapp_v3/node_modules/vant/es/loading/Loading.mjs
import { computed, defineComponent, createVNode as _createVNode } from "vue";
var [name, bem] = createNamespace("loading");
var SpinIcon = Array(12).fill(null).map((_, index) => _createVNode("i", {
  "class": bem("line", String(index + 1))
}, null));
var CircularIcon = _createVNode("svg", {
  "class": bem("circular"),
  "viewBox": "25 25 50 50"
}, [_createVNode("circle", {
  "cx": "50",
  "cy": "50",
  "r": "20",
  "fill": "none"
}, null)]);
var loadingProps = {
  size: numericProp,
  type: makeStringProp("circular"),
  color: String,
  vertical: Boolean,
  textSize: numericProp,
  textColor: String
};
var stdin_default = defineComponent({
  name,
  props: loadingProps,
  setup(props, {
    slots
  }) {
    const spinnerStyle = computed(() => extend({
      color: props.color
    }, getSizeStyle(props.size)));
    const renderIcon = () => {
      const DefaultIcon = props.type === "spinner" ? SpinIcon : CircularIcon;
      return _createVNode("span", {
        "class": bem("spinner", props.type),
        "style": spinnerStyle.value
      }, [slots.icon ? slots.icon() : DefaultIcon]);
    };
    const renderText = () => {
      var _a;
      if (slots.default) {
        return _createVNode("span", {
          "class": bem("text"),
          "style": {
            fontSize: addUnit(props.textSize),
            color: (_a = props.textColor) != null ? _a : props.color
          }
        }, [slots.default()]);
      }
    };
    return () => {
      const {
        type,
        vertical
      } = props;
      return _createVNode("div", {
        "class": bem([type, {
          vertical
        }]),
        "aria-live": "polite",
        "aria-busy": true
      }, [renderIcon(), renderText()]);
    };
  }
});

// ../../../../../ProjectSpace/UniAppSpace/nurseapp_v3/node_modules/vant/es/loading/index.mjs
var Loading = withInstall(stdin_default);

export {
  loadingProps,
  Loading
};
//# sourceMappingURL=chunk-4C6QPDC3.js.map
